20: +=======================================================================*/
21: --
22: --
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
21: --
22: --
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
22: --
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
23: TYPE t_rec_array_event IS RECORD
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
24: (array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
25: ,array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
26: ,array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
27: ,array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
28: ,array_event_id xla_number_array_type --XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
29: ,array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
30: ,array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
31: ,array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
32: ,array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
33: ,array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
34: ,array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
35: ,array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
36: ,array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
37: ,array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
38: ,array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
39: ,array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
47: --
40: ,array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
47: --
48: type t_array_value_num is table of number index by varchar2(30);
41: ,array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
42: ,array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
43: ,array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
44: ,array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date
45: ,array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L
46: );
47: --
48: type t_array_value_num is table of number index by varchar2(30);
49: type t_array_value_char is table of varchar2(240) index by varchar2(30);
158:
159: END IF;
160:
161: IF p_lookup_code IS NOT NULL AND p_meaning IS NULL THEN
162: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
163: xla_accounting_err_pkg. build_message
164: (p_appli_s_name => 'XLA'
165: ,p_msg_name => 'XLA_AP_NO_LOOKUP_MEANING'
166: ,p_token_1 => 'SOURCE_NAME'
173: ,p_value_2 => p_lookup_code
174: ,p_token_3 => 'LOOKUP_TYPE'
175: ,p_value_3 => p_lookup_type
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
174: ,p_token_3 => 'LOOKUP_TYPE'
175: ,p_value_3 => p_lookup_type
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
182:
175: ,p_value_3 => p_lookup_type
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
182:
183: IF (C_LEVEL_ERROR >= g_log_level) THEN
176: ,p_token_4 => 'PRODUCT_NAME'
177: ,p_value_4 => xla_ae_journal_entry_pkg.g_cache_event.application_name
178: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
179: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
180: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
181: );
182:
183: IF (C_LEVEL_ERROR >= g_log_level) THEN
184: trace
261: ,p_level => C_LEVEL_PROCEDURE
262: ,p_module => l_log_module);
263: END IF;
264:
265: l_ledger_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
266: l_component_type := 'AMB_DESCRIPTION';
267: l_component_code := 'JE_INV_DIST_DESCRIPTION';
268: l_component_type_code := 'S';
269: l_component_appl_id := 200;
360: ,p_level => C_LEVEL_PROCEDURE
361: ,p_module => l_log_module);
362: END IF;
363:
364: l_ledger_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
365: l_component_type := 'AMB_DESCRIPTION';
366: l_component_code := 'JE_INV_HEADER _DESC';
367: l_component_type_code := 'S';
368: l_component_appl_id := 200;
409: l_description := SUBSTR(CONCAT(l_description,'Date:'),1,2000);
410: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
411: END IF;
412: l_source := SUBSTR(xla_ae_sources_pkg.DATE_TO_CHAR(p_source_4,
413: xla_ae_journal_entry_pkg.g_cache_ledgers_info.nls_desc_language),1,1996);
414: IF l_source IS NOT NULL THEN
415: l_description := SUBSTR(CONCAT(l_description,l_source),1,2000);
416: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
417: END IF;
523: l_description := SUBSTR(CONCAT(l_description,'Invoice Date:'),1,2000);
524: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
525: END IF;
526: l_source := SUBSTR(xla_ae_sources_pkg.DATE_TO_CHAR(p_source_4,
527: xla_ae_journal_entry_pkg.g_cache_ledgers_info.nls_desc_language),1,1996);
528: IF l_source IS NOT NULL THEN
529: l_description := SUBSTR(CONCAT(l_description,l_source),1,2000);
530: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
531: END IF;
627: ,p_level => C_LEVEL_PROCEDURE
628: ,p_module => l_log_module);
629: END IF;
630:
631: l_ledger_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
632: l_component_type := 'AMB_DESCRIPTION';
633: l_component_code := 'JE_PAYMENT_HEADER_DESC';
634: l_component_type_code := 'S';
635: l_component_appl_id := 200;
706: l_description := SUBSTR(CONCAT(l_description,'Payment Date:'),1,2000);
707: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
708: END IF;
709: l_source := SUBSTR(xla_ae_sources_pkg.DATE_TO_CHAR(p_source_11,
710: xla_ae_journal_entry_pkg.g_cache_ledgers_info.nls_desc_language),1,1996);
711: IF l_source IS NOT NULL THEN
712: l_description := SUBSTR(CONCAT(l_description,l_source),1,2000);
713: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
714: END IF;
790: l_description := SUBSTR(CONCAT(l_description,'Payment Date:'),1,2000);
791: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
792: END IF;
793: l_source := SUBSTR(xla_ae_sources_pkg.DATE_TO_CHAR(p_source_11,
794: xla_ae_journal_entry_pkg.g_cache_ledgers_info.nls_desc_language),1,1996);
795: IF l_source IS NOT NULL THEN
796: l_description := SUBSTR(CONCAT(l_description,l_source),1,2000);
797: l_description := SUBSTR(CONCAT(l_description,' '),1,2000);
798: END IF;
955: ,p_module => l_log_module);
956:
957: END IF;
958:
959: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
960: x_value_combination_id := null;
961: x_value_segment_code := null;
962: x_value_type_code := null;
963: l_output_value := null;
977: 'XLA_OWNER_TYPE'
978: ,l_component_type_code
979: )
980: ,p_token_3 => 'PAD_NAME'
981: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
982: ,p_token_4 => 'PAD_OWNER'
983: ,p_value_4 => xla_lookups_pkg.get_meaning(
984: 'XLA_OWNER_TYPE'
985: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
981: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
982: ,p_token_4 => 'PAD_OWNER'
983: ,p_value_4 => xla_lookups_pkg.get_meaning(
984: 'XLA_OWNER_TYPE'
985: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
986: )
987: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
988: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
989: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
983: ,p_value_4 => xla_lookups_pkg.get_meaning(
984: 'XLA_OWNER_TYPE'
985: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
986: )
987: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
988: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
989: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
990: ,p_ae_header_id => NULL
991: );
984: 'XLA_OWNER_TYPE'
985: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
986: )
987: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
988: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
989: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
990: ,p_ae_header_id => NULL
991: );
992: RETURN l_output_value;
985: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
986: )
987: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
988: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
989: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
990: ,p_ae_header_id => NULL
991: );
992: RETURN l_output_value;
993: EXCEPTION
1088: ,p_module => l_log_module);
1089:
1090: END IF;
1091:
1092: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1093: x_value_combination_id := null;
1094: x_value_segment_code := null;
1095: x_value_type_code := null;
1096: l_output_value := null;
1110: 'XLA_OWNER_TYPE'
1111: ,l_component_type_code
1112: )
1113: ,p_token_3 => 'PAD_NAME'
1114: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1115: ,p_token_4 => 'PAD_OWNER'
1116: ,p_value_4 => xla_lookups_pkg.get_meaning(
1117: 'XLA_OWNER_TYPE'
1118: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1114: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1115: ,p_token_4 => 'PAD_OWNER'
1116: ,p_value_4 => xla_lookups_pkg.get_meaning(
1117: 'XLA_OWNER_TYPE'
1118: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1119: )
1120: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1121: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1122: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1116: ,p_value_4 => xla_lookups_pkg.get_meaning(
1117: 'XLA_OWNER_TYPE'
1118: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1119: )
1120: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1121: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1122: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1123: ,p_ae_header_id => NULL
1124: );
1117: 'XLA_OWNER_TYPE'
1118: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1119: )
1120: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1121: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1122: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1123: ,p_ae_header_id => NULL
1124: );
1125: RETURN l_output_value;
1118: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1119: )
1120: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1121: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1122: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1123: ,p_ae_header_id => NULL
1124: );
1125: RETURN l_output_value;
1126: EXCEPTION
1210: ,p_module => l_log_module);
1211:
1212: END IF;
1213:
1214: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1215: x_value_combination_id := null;
1216: x_value_segment_code := null;
1217: x_value_type_code := null;
1218: l_output_value := null;
1232: 'XLA_OWNER_TYPE'
1233: ,l_component_type_code
1234: )
1235: ,p_token_3 => 'PAD_NAME'
1236: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1237: ,p_token_4 => 'PAD_OWNER'
1238: ,p_value_4 => xla_lookups_pkg.get_meaning(
1239: 'XLA_OWNER_TYPE'
1240: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1236: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1237: ,p_token_4 => 'PAD_OWNER'
1238: ,p_value_4 => xla_lookups_pkg.get_meaning(
1239: 'XLA_OWNER_TYPE'
1240: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1241: )
1242: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1243: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1244: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1238: ,p_value_4 => xla_lookups_pkg.get_meaning(
1239: 'XLA_OWNER_TYPE'
1240: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1241: )
1242: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1243: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1244: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1245: ,p_ae_header_id => NULL
1246: );
1239: 'XLA_OWNER_TYPE'
1240: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1241: )
1242: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1243: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1244: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1245: ,p_ae_header_id => NULL
1246: );
1247: RETURN l_output_value;
1240: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1241: )
1242: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1243: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1244: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1245: ,p_ae_header_id => NULL
1246: );
1247: RETURN l_output_value;
1248: EXCEPTION
1348: ,p_module => l_log_module);
1349:
1350: END IF;
1351:
1352: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1353: x_value_combination_id := null;
1354: x_value_segment_code := null;
1355: x_value_type_code := null;
1356: l_output_value := null;
1370: 'XLA_OWNER_TYPE'
1371: ,l_component_type_code
1372: )
1373: ,p_token_3 => 'PAD_NAME'
1374: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1375: ,p_token_4 => 'PAD_OWNER'
1376: ,p_value_4 => xla_lookups_pkg.get_meaning(
1377: 'XLA_OWNER_TYPE'
1378: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1374: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1375: ,p_token_4 => 'PAD_OWNER'
1376: ,p_value_4 => xla_lookups_pkg.get_meaning(
1377: 'XLA_OWNER_TYPE'
1378: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1379: )
1380: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1381: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1382: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1376: ,p_value_4 => xla_lookups_pkg.get_meaning(
1377: 'XLA_OWNER_TYPE'
1378: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1379: )
1380: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1381: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1382: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1383: ,p_ae_header_id => NULL
1384: );
1377: 'XLA_OWNER_TYPE'
1378: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1379: )
1380: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1381: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1382: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1383: ,p_ae_header_id => NULL
1384: );
1385: RETURN l_output_value;
1378: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1379: )
1380: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1381: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1382: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1383: ,p_ae_header_id => NULL
1384: );
1385: RETURN l_output_value;
1386: EXCEPTION
1512: ,p_module => l_log_module);
1513:
1514: END IF;
1515:
1516: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1517: x_value_combination_id := null;
1518: x_value_segment_code := null;
1519: x_value_type_code := null;
1520: l_output_value := null;
1534: 'XLA_OWNER_TYPE'
1535: ,l_component_type_code
1536: )
1537: ,p_token_3 => 'PAD_NAME'
1538: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1539: ,p_token_4 => 'PAD_OWNER'
1540: ,p_value_4 => xla_lookups_pkg.get_meaning(
1541: 'XLA_OWNER_TYPE'
1542: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1538: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1539: ,p_token_4 => 'PAD_OWNER'
1540: ,p_value_4 => xla_lookups_pkg.get_meaning(
1541: 'XLA_OWNER_TYPE'
1542: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1543: )
1544: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1545: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1546: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1540: ,p_value_4 => xla_lookups_pkg.get_meaning(
1541: 'XLA_OWNER_TYPE'
1542: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1543: )
1544: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1545: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1546: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1547: ,p_ae_header_id => NULL
1548: );
1541: 'XLA_OWNER_TYPE'
1542: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1543: )
1544: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1545: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1546: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1547: ,p_ae_header_id => NULL
1548: );
1549: RETURN l_output_value;
1542: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1543: )
1544: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1545: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1546: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1547: ,p_ae_header_id => NULL
1548: );
1549: RETURN l_output_value;
1550: EXCEPTION
1650: ,p_module => l_log_module);
1651:
1652: END IF;
1653:
1654: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1655: x_value_combination_id := null;
1656: x_value_segment_code := null;
1657: x_value_type_code := null;
1658: l_output_value := null;
1672: 'XLA_OWNER_TYPE'
1673: ,l_component_type_code
1674: )
1675: ,p_token_3 => 'PAD_NAME'
1676: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1677: ,p_token_4 => 'PAD_OWNER'
1678: ,p_value_4 => xla_lookups_pkg.get_meaning(
1679: 'XLA_OWNER_TYPE'
1680: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1676: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1677: ,p_token_4 => 'PAD_OWNER'
1678: ,p_value_4 => xla_lookups_pkg.get_meaning(
1679: 'XLA_OWNER_TYPE'
1680: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1681: )
1682: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1683: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1684: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1678: ,p_value_4 => xla_lookups_pkg.get_meaning(
1679: 'XLA_OWNER_TYPE'
1680: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1681: )
1682: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1683: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1684: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1685: ,p_ae_header_id => NULL
1686: );
1679: 'XLA_OWNER_TYPE'
1680: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1681: )
1682: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1683: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1684: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1685: ,p_ae_header_id => NULL
1686: );
1687: RETURN l_output_value;
1680: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1681: )
1682: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1683: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1684: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1685: ,p_ae_header_id => NULL
1686: );
1687: RETURN l_output_value;
1688: EXCEPTION
1788: ,p_module => l_log_module);
1789:
1790: END IF;
1791:
1792: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1793: x_value_combination_id := null;
1794: x_value_segment_code := null;
1795: x_value_type_code := null;
1796: l_output_value := null;
1810: 'XLA_OWNER_TYPE'
1811: ,l_component_type_code
1812: )
1813: ,p_token_3 => 'PAD_NAME'
1814: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1815: ,p_token_4 => 'PAD_OWNER'
1816: ,p_value_4 => xla_lookups_pkg.get_meaning(
1817: 'XLA_OWNER_TYPE'
1818: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1814: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
1815: ,p_token_4 => 'PAD_OWNER'
1816: ,p_value_4 => xla_lookups_pkg.get_meaning(
1817: 'XLA_OWNER_TYPE'
1818: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1819: )
1820: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1821: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1822: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1816: ,p_value_4 => xla_lookups_pkg.get_meaning(
1817: 'XLA_OWNER_TYPE'
1818: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1819: )
1820: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1821: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1822: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1823: ,p_ae_header_id => NULL
1824: );
1817: 'XLA_OWNER_TYPE'
1818: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1819: )
1820: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1821: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1822: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1823: ,p_ae_header_id => NULL
1824: );
1825: RETURN l_output_value;
1818: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
1819: )
1820: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
1821: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
1822: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
1823: ,p_ae_header_id => NULL
1824: );
1825: RETURN l_output_value;
1826: EXCEPTION
1992: ,p_module => l_log_module);
1993:
1994: END IF;
1995:
1996: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
1997: x_value_combination_id := null;
1998: x_value_segment_code := null;
1999: x_value_type_code := null;
2000: l_output_value := null;
2014: 'XLA_OWNER_TYPE'
2015: ,l_component_type_code
2016: )
2017: ,p_token_3 => 'PAD_NAME'
2018: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2019: ,p_token_4 => 'PAD_OWNER'
2020: ,p_value_4 => xla_lookups_pkg.get_meaning(
2021: 'XLA_OWNER_TYPE'
2022: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2018: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2019: ,p_token_4 => 'PAD_OWNER'
2020: ,p_value_4 => xla_lookups_pkg.get_meaning(
2021: 'XLA_OWNER_TYPE'
2022: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2023: )
2024: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2025: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2026: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2020: ,p_value_4 => xla_lookups_pkg.get_meaning(
2021: 'XLA_OWNER_TYPE'
2022: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2023: )
2024: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2025: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2026: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2027: ,p_ae_header_id => NULL
2028: );
2021: 'XLA_OWNER_TYPE'
2022: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2023: )
2024: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2025: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2026: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2027: ,p_ae_header_id => NULL
2028: );
2029: RETURN l_output_value;
2022: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2023: )
2024: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2025: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2026: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2027: ,p_ae_header_id => NULL
2028: );
2029: RETURN l_output_value;
2030: EXCEPTION
2124: ,p_module => l_log_module);
2125:
2126: END IF;
2127:
2128: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2129: x_value_combination_id := null;
2130: x_value_segment_code := null;
2131: x_value_type_code := null;
2132: l_output_value := null;
2146: 'XLA_OWNER_TYPE'
2147: ,l_component_type_code
2148: )
2149: ,p_token_3 => 'PAD_NAME'
2150: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2151: ,p_token_4 => 'PAD_OWNER'
2152: ,p_value_4 => xla_lookups_pkg.get_meaning(
2153: 'XLA_OWNER_TYPE'
2154: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2150: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2151: ,p_token_4 => 'PAD_OWNER'
2152: ,p_value_4 => xla_lookups_pkg.get_meaning(
2153: 'XLA_OWNER_TYPE'
2154: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2155: )
2156: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2157: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2158: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2152: ,p_value_4 => xla_lookups_pkg.get_meaning(
2153: 'XLA_OWNER_TYPE'
2154: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2155: )
2156: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2157: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2158: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2159: ,p_ae_header_id => NULL
2160: );
2153: 'XLA_OWNER_TYPE'
2154: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2155: )
2156: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2157: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2158: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2159: ,p_ae_header_id => NULL
2160: );
2161: RETURN l_output_value;
2154: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2155: )
2156: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2157: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2158: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2159: ,p_ae_header_id => NULL
2160: );
2161: RETURN l_output_value;
2162: EXCEPTION
2265: ,p_module => l_log_module);
2266:
2267: END IF;
2268:
2269: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2270: x_value_combination_id := null;
2271: x_value_segment_code := null;
2272: x_value_type_code := null;
2273: l_output_value := null;
2287: 'XLA_OWNER_TYPE'
2288: ,l_component_type_code
2289: )
2290: ,p_token_3 => 'PAD_NAME'
2291: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2292: ,p_token_4 => 'PAD_OWNER'
2293: ,p_value_4 => xla_lookups_pkg.get_meaning(
2294: 'XLA_OWNER_TYPE'
2295: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2291: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2292: ,p_token_4 => 'PAD_OWNER'
2293: ,p_value_4 => xla_lookups_pkg.get_meaning(
2294: 'XLA_OWNER_TYPE'
2295: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2296: )
2297: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2298: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2299: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2293: ,p_value_4 => xla_lookups_pkg.get_meaning(
2294: 'XLA_OWNER_TYPE'
2295: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2296: )
2297: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2298: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2299: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2300: ,p_ae_header_id => NULL
2301: );
2294: 'XLA_OWNER_TYPE'
2295: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2296: )
2297: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2298: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2299: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2300: ,p_ae_header_id => NULL
2301: );
2302: RETURN l_output_value;
2295: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2296: )
2297: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2298: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2299: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2300: ,p_ae_header_id => NULL
2301: );
2302: RETURN l_output_value;
2303: EXCEPTION
2398: ,p_module => l_log_module);
2399:
2400: END IF;
2401:
2402: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2403: x_value_combination_id := null;
2404: x_value_segment_code := null;
2405: x_value_type_code := null;
2406: l_output_value := null;
2420: 'XLA_OWNER_TYPE'
2421: ,l_component_type_code
2422: )
2423: ,p_token_3 => 'PAD_NAME'
2424: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2425: ,p_token_4 => 'PAD_OWNER'
2426: ,p_value_4 => xla_lookups_pkg.get_meaning(
2427: 'XLA_OWNER_TYPE'
2428: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2424: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2425: ,p_token_4 => 'PAD_OWNER'
2426: ,p_value_4 => xla_lookups_pkg.get_meaning(
2427: 'XLA_OWNER_TYPE'
2428: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2429: )
2430: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2431: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2432: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2426: ,p_value_4 => xla_lookups_pkg.get_meaning(
2427: 'XLA_OWNER_TYPE'
2428: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2429: )
2430: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2431: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2432: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2433: ,p_ae_header_id => NULL
2434: );
2427: 'XLA_OWNER_TYPE'
2428: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2429: )
2430: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2431: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2432: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2433: ,p_ae_header_id => NULL
2434: );
2435: RETURN l_output_value;
2428: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2429: )
2430: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2431: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2432: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2433: ,p_ae_header_id => NULL
2434: );
2435: RETURN l_output_value;
2436: EXCEPTION
2520: ,p_module => l_log_module);
2521:
2522: END IF;
2523:
2524: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2525: x_value_combination_id := null;
2526: x_value_segment_code := null;
2527: x_value_type_code := null;
2528: l_output_value := null;
2542: 'XLA_OWNER_TYPE'
2543: ,l_component_type_code
2544: )
2545: ,p_token_3 => 'PAD_NAME'
2546: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2547: ,p_token_4 => 'PAD_OWNER'
2548: ,p_value_4 => xla_lookups_pkg.get_meaning(
2549: 'XLA_OWNER_TYPE'
2550: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2546: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2547: ,p_token_4 => 'PAD_OWNER'
2548: ,p_value_4 => xla_lookups_pkg.get_meaning(
2549: 'XLA_OWNER_TYPE'
2550: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2551: )
2552: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2553: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2554: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2548: ,p_value_4 => xla_lookups_pkg.get_meaning(
2549: 'XLA_OWNER_TYPE'
2550: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2551: )
2552: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2553: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2554: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2555: ,p_ae_header_id => NULL
2556: );
2549: 'XLA_OWNER_TYPE'
2550: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2551: )
2552: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2553: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2554: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2555: ,p_ae_header_id => NULL
2556: );
2557: RETURN l_output_value;
2550: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2551: )
2552: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2553: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2554: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2555: ,p_ae_header_id => NULL
2556: );
2557: RETURN l_output_value;
2558: EXCEPTION
2642: ,p_module => l_log_module);
2643:
2644: END IF;
2645:
2646: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2647: x_value_combination_id := null;
2648: x_value_segment_code := null;
2649: x_value_type_code := null;
2650: l_output_value := null;
2664: 'XLA_OWNER_TYPE'
2665: ,l_component_type_code
2666: )
2667: ,p_token_3 => 'PAD_NAME'
2668: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2669: ,p_token_4 => 'PAD_OWNER'
2670: ,p_value_4 => xla_lookups_pkg.get_meaning(
2671: 'XLA_OWNER_TYPE'
2672: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2668: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2669: ,p_token_4 => 'PAD_OWNER'
2670: ,p_value_4 => xla_lookups_pkg.get_meaning(
2671: 'XLA_OWNER_TYPE'
2672: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2673: )
2674: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2675: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2676: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2670: ,p_value_4 => xla_lookups_pkg.get_meaning(
2671: 'XLA_OWNER_TYPE'
2672: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2673: )
2674: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2675: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2676: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2677: ,p_ae_header_id => NULL
2678: );
2671: 'XLA_OWNER_TYPE'
2672: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2673: )
2674: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2675: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2676: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2677: ,p_ae_header_id => NULL
2678: );
2679: RETURN l_output_value;
2672: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2673: )
2674: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2675: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2676: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2677: ,p_ae_header_id => NULL
2678: );
2679: RETURN l_output_value;
2680: EXCEPTION
2795: ,p_module => l_log_module);
2796:
2797: END IF;
2798:
2799: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2800: x_value_combination_id := null;
2801: x_value_segment_code := null;
2802: x_value_type_code := null;
2803: l_output_value := null;
2817: 'XLA_OWNER_TYPE'
2818: ,l_component_type_code
2819: )
2820: ,p_token_3 => 'PAD_NAME'
2821: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2822: ,p_token_4 => 'PAD_OWNER'
2823: ,p_value_4 => xla_lookups_pkg.get_meaning(
2824: 'XLA_OWNER_TYPE'
2825: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2821: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2822: ,p_token_4 => 'PAD_OWNER'
2823: ,p_value_4 => xla_lookups_pkg.get_meaning(
2824: 'XLA_OWNER_TYPE'
2825: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2826: )
2827: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2828: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2829: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2823: ,p_value_4 => xla_lookups_pkg.get_meaning(
2824: 'XLA_OWNER_TYPE'
2825: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2826: )
2827: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2828: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2829: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2830: ,p_ae_header_id => NULL
2831: );
2824: 'XLA_OWNER_TYPE'
2825: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2826: )
2827: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2828: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2829: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2830: ,p_ae_header_id => NULL
2831: );
2832: RETURN l_output_value;
2825: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2826: )
2827: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2828: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2829: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2830: ,p_ae_header_id => NULL
2831: );
2832: RETURN l_output_value;
2833: EXCEPTION
2948: ,p_module => l_log_module);
2949:
2950: END IF;
2951:
2952: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
2953: x_value_combination_id := null;
2954: x_value_segment_code := null;
2955: x_value_type_code := null;
2956: l_output_value := null;
2970: 'XLA_OWNER_TYPE'
2971: ,l_component_type_code
2972: )
2973: ,p_token_3 => 'PAD_NAME'
2974: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2975: ,p_token_4 => 'PAD_OWNER'
2976: ,p_value_4 => xla_lookups_pkg.get_meaning(
2977: 'XLA_OWNER_TYPE'
2978: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2974: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
2975: ,p_token_4 => 'PAD_OWNER'
2976: ,p_value_4 => xla_lookups_pkg.get_meaning(
2977: 'XLA_OWNER_TYPE'
2978: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2979: )
2980: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2981: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2982: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2976: ,p_value_4 => xla_lookups_pkg.get_meaning(
2977: 'XLA_OWNER_TYPE'
2978: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2979: )
2980: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2981: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2982: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2983: ,p_ae_header_id => NULL
2984: );
2977: 'XLA_OWNER_TYPE'
2978: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2979: )
2980: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2981: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2982: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2983: ,p_ae_header_id => NULL
2984: );
2985: RETURN l_output_value;
2978: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
2979: )
2980: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
2981: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
2982: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
2983: ,p_ae_header_id => NULL
2984: );
2985: RETURN l_output_value;
2986: EXCEPTION
3070: ,p_module => l_log_module);
3071:
3072: END IF;
3073:
3074: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3075: x_value_combination_id := null;
3076: x_value_segment_code := null;
3077: x_value_type_code := null;
3078: l_output_value := null;
3092: 'XLA_OWNER_TYPE'
3093: ,l_component_type_code
3094: )
3095: ,p_token_3 => 'PAD_NAME'
3096: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3097: ,p_token_4 => 'PAD_OWNER'
3098: ,p_value_4 => xla_lookups_pkg.get_meaning(
3099: 'XLA_OWNER_TYPE'
3100: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3096: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3097: ,p_token_4 => 'PAD_OWNER'
3098: ,p_value_4 => xla_lookups_pkg.get_meaning(
3099: 'XLA_OWNER_TYPE'
3100: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3101: )
3102: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3103: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3104: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3098: ,p_value_4 => xla_lookups_pkg.get_meaning(
3099: 'XLA_OWNER_TYPE'
3100: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3101: )
3102: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3103: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3104: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3105: ,p_ae_header_id => NULL
3106: );
3099: 'XLA_OWNER_TYPE'
3100: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3101: )
3102: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3103: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3104: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3105: ,p_ae_header_id => NULL
3106: );
3107: RETURN l_output_value;
3100: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3101: )
3102: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3103: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3104: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3105: ,p_ae_header_id => NULL
3106: );
3107: RETURN l_output_value;
3108: EXCEPTION
3192: ,p_module => l_log_module);
3193:
3194: END IF;
3195:
3196: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3197: x_value_combination_id := null;
3198: x_value_segment_code := null;
3199: x_value_type_code := null;
3200: l_output_value := null;
3214: 'XLA_OWNER_TYPE'
3215: ,l_component_type_code
3216: )
3217: ,p_token_3 => 'PAD_NAME'
3218: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3219: ,p_token_4 => 'PAD_OWNER'
3220: ,p_value_4 => xla_lookups_pkg.get_meaning(
3221: 'XLA_OWNER_TYPE'
3222: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3218: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3219: ,p_token_4 => 'PAD_OWNER'
3220: ,p_value_4 => xla_lookups_pkg.get_meaning(
3221: 'XLA_OWNER_TYPE'
3222: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3223: )
3224: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3225: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3226: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3220: ,p_value_4 => xla_lookups_pkg.get_meaning(
3221: 'XLA_OWNER_TYPE'
3222: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3223: )
3224: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3225: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3226: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3227: ,p_ae_header_id => NULL
3228: );
3221: 'XLA_OWNER_TYPE'
3222: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3223: )
3224: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3225: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3226: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3227: ,p_ae_header_id => NULL
3228: );
3229: RETURN l_output_value;
3222: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3223: )
3224: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3225: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3226: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3227: ,p_ae_header_id => NULL
3228: );
3229: RETURN l_output_value;
3230: EXCEPTION
3330: ,p_module => l_log_module);
3331:
3332: END IF;
3333:
3334: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3335: x_value_combination_id := null;
3336: x_value_segment_code := null;
3337: x_value_type_code := null;
3338: l_output_value := null;
3352: 'XLA_OWNER_TYPE'
3353: ,l_component_type_code
3354: )
3355: ,p_token_3 => 'PAD_NAME'
3356: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3357: ,p_token_4 => 'PAD_OWNER'
3358: ,p_value_4 => xla_lookups_pkg.get_meaning(
3359: 'XLA_OWNER_TYPE'
3360: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3356: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3357: ,p_token_4 => 'PAD_OWNER'
3358: ,p_value_4 => xla_lookups_pkg.get_meaning(
3359: 'XLA_OWNER_TYPE'
3360: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3361: )
3362: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3363: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3364: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3358: ,p_value_4 => xla_lookups_pkg.get_meaning(
3359: 'XLA_OWNER_TYPE'
3360: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3361: )
3362: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3363: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3364: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3365: ,p_ae_header_id => NULL
3366: );
3359: 'XLA_OWNER_TYPE'
3360: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3361: )
3362: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3363: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3364: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3365: ,p_ae_header_id => NULL
3366: );
3367: RETURN l_output_value;
3360: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3361: )
3362: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3363: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3364: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3365: ,p_ae_header_id => NULL
3366: );
3367: RETURN l_output_value;
3368: EXCEPTION
3463: ,p_module => l_log_module);
3464:
3465: END IF;
3466:
3467: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3468: x_value_combination_id := null;
3469: x_value_segment_code := null;
3470: x_value_type_code := null;
3471: l_output_value := null;
3485: 'XLA_OWNER_TYPE'
3486: ,l_component_type_code
3487: )
3488: ,p_token_3 => 'PAD_NAME'
3489: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3490: ,p_token_4 => 'PAD_OWNER'
3491: ,p_value_4 => xla_lookups_pkg.get_meaning(
3492: 'XLA_OWNER_TYPE'
3493: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3489: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3490: ,p_token_4 => 'PAD_OWNER'
3491: ,p_value_4 => xla_lookups_pkg.get_meaning(
3492: 'XLA_OWNER_TYPE'
3493: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3494: )
3495: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3496: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3497: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3491: ,p_value_4 => xla_lookups_pkg.get_meaning(
3492: 'XLA_OWNER_TYPE'
3493: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3494: )
3495: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3496: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3497: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3498: ,p_ae_header_id => NULL
3499: );
3492: 'XLA_OWNER_TYPE'
3493: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3494: )
3495: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3496: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3497: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3498: ,p_ae_header_id => NULL
3499: );
3500: RETURN l_output_value;
3493: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3494: )
3495: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3496: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3497: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3498: ,p_ae_header_id => NULL
3499: );
3500: RETURN l_output_value;
3501: EXCEPTION
3601: ,p_module => l_log_module);
3602:
3603: END IF;
3604:
3605: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3606: x_value_combination_id := null;
3607: x_value_segment_code := null;
3608: x_value_type_code := null;
3609: l_output_value := null;
3623: 'XLA_OWNER_TYPE'
3624: ,l_component_type_code
3625: )
3626: ,p_token_3 => 'PAD_NAME'
3627: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3628: ,p_token_4 => 'PAD_OWNER'
3629: ,p_value_4 => xla_lookups_pkg.get_meaning(
3630: 'XLA_OWNER_TYPE'
3631: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3627: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3628: ,p_token_4 => 'PAD_OWNER'
3629: ,p_value_4 => xla_lookups_pkg.get_meaning(
3630: 'XLA_OWNER_TYPE'
3631: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3632: )
3633: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3634: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3635: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3629: ,p_value_4 => xla_lookups_pkg.get_meaning(
3630: 'XLA_OWNER_TYPE'
3631: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3632: )
3633: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3634: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3635: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3636: ,p_ae_header_id => NULL
3637: );
3630: 'XLA_OWNER_TYPE'
3631: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3632: )
3633: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3634: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3635: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3636: ,p_ae_header_id => NULL
3637: );
3638: RETURN l_output_value;
3631: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3632: )
3633: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3634: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3635: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3636: ,p_ae_header_id => NULL
3637: );
3638: RETURN l_output_value;
3639: EXCEPTION
3734: ,p_module => l_log_module);
3735:
3736: END IF;
3737:
3738: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3739: x_value_combination_id := null;
3740: x_value_segment_code := null;
3741: x_value_type_code := null;
3742: l_output_value := null;
3756: 'XLA_OWNER_TYPE'
3757: ,l_component_type_code
3758: )
3759: ,p_token_3 => 'PAD_NAME'
3760: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3761: ,p_token_4 => 'PAD_OWNER'
3762: ,p_value_4 => xla_lookups_pkg.get_meaning(
3763: 'XLA_OWNER_TYPE'
3764: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3760: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3761: ,p_token_4 => 'PAD_OWNER'
3762: ,p_value_4 => xla_lookups_pkg.get_meaning(
3763: 'XLA_OWNER_TYPE'
3764: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3765: )
3766: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3767: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3768: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3762: ,p_value_4 => xla_lookups_pkg.get_meaning(
3763: 'XLA_OWNER_TYPE'
3764: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3765: )
3766: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3767: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3768: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3769: ,p_ae_header_id => NULL
3770: );
3763: 'XLA_OWNER_TYPE'
3764: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3765: )
3766: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3767: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3768: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3769: ,p_ae_header_id => NULL
3770: );
3771: RETURN l_output_value;
3764: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3765: )
3766: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3767: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3768: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3769: ,p_ae_header_id => NULL
3770: );
3771: RETURN l_output_value;
3772: EXCEPTION
3867: ,p_module => l_log_module);
3868:
3869: END IF;
3870:
3871: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
3872: x_value_combination_id := null;
3873: x_value_segment_code := null;
3874: x_value_type_code := null;
3875: l_output_value := null;
3889: 'XLA_OWNER_TYPE'
3890: ,l_component_type_code
3891: )
3892: ,p_token_3 => 'PAD_NAME'
3893: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3894: ,p_token_4 => 'PAD_OWNER'
3895: ,p_value_4 => xla_lookups_pkg.get_meaning(
3896: 'XLA_OWNER_TYPE'
3897: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3893: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
3894: ,p_token_4 => 'PAD_OWNER'
3895: ,p_value_4 => xla_lookups_pkg.get_meaning(
3896: 'XLA_OWNER_TYPE'
3897: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3898: )
3899: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3900: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3901: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3895: ,p_value_4 => xla_lookups_pkg.get_meaning(
3896: 'XLA_OWNER_TYPE'
3897: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3898: )
3899: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3900: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3901: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3902: ,p_ae_header_id => NULL
3903: );
3896: 'XLA_OWNER_TYPE'
3897: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3898: )
3899: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3900: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3901: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3902: ,p_ae_header_id => NULL
3903: );
3904: RETURN l_output_value;
3897: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
3898: )
3899: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
3900: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
3901: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
3902: ,p_ae_header_id => NULL
3903: );
3904: RETURN l_output_value;
3905: EXCEPTION
3996: (p_msg => 'END of AcctDerRule_26(invalid)'
3997: ,p_level => C_LEVEL_PROCEDURE
3998: ,p_module => l_log_module);
3999: END IF;
4000: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4001: x_value_type_code := null;
4002: l_output_value := null;
4003: xla_accounting_err_pkg.build_message
4004: (p_appli_s_name => 'XLA'
4016: 'XLA_OWNER_TYPE'
4017: ,l_component_type_code
4018: )
4019: ,p_token_3 => 'PAD_NAME'
4020: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4021: ,p_token_4 => 'PAD_OWNER'
4022: ,p_value_4 => xla_lookups_pkg.get_meaning(
4023: 'XLA_OWNER_TYPE'
4024: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4020: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4021: ,p_token_4 => 'PAD_OWNER'
4022: ,p_value_4 => xla_lookups_pkg.get_meaning(
4023: 'XLA_OWNER_TYPE'
4024: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4025: )
4026: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4027: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4028: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4022: ,p_value_4 => xla_lookups_pkg.get_meaning(
4023: 'XLA_OWNER_TYPE'
4024: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4025: )
4026: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4027: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4028: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4029: ,p_ae_header_id => NULL
4030: );
4023: 'XLA_OWNER_TYPE'
4024: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4025: )
4026: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4027: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4028: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4029: ,p_ae_header_id => NULL
4030: );
4031: RETURN l_output_value;
4024: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4025: )
4026: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4027: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4028: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4029: ,p_ae_header_id => NULL
4030: );
4031: RETURN l_output_value;
4032: EXCEPTION
4123: (p_msg => 'END of AcctDerRule_27(invalid)'
4124: ,p_level => C_LEVEL_PROCEDURE
4125: ,p_module => l_log_module);
4126: END IF;
4127: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4128: x_value_type_code := null;
4129: l_output_value := null;
4130: xla_accounting_err_pkg.build_message
4131: (p_appli_s_name => 'XLA'
4143: 'XLA_OWNER_TYPE'
4144: ,l_component_type_code
4145: )
4146: ,p_token_3 => 'PAD_NAME'
4147: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4148: ,p_token_4 => 'PAD_OWNER'
4149: ,p_value_4 => xla_lookups_pkg.get_meaning(
4150: 'XLA_OWNER_TYPE'
4151: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4147: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4148: ,p_token_4 => 'PAD_OWNER'
4149: ,p_value_4 => xla_lookups_pkg.get_meaning(
4150: 'XLA_OWNER_TYPE'
4151: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4152: )
4153: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4154: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4155: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4149: ,p_value_4 => xla_lookups_pkg.get_meaning(
4150: 'XLA_OWNER_TYPE'
4151: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4152: )
4153: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4154: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4155: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4156: ,p_ae_header_id => NULL
4157: );
4150: 'XLA_OWNER_TYPE'
4151: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4152: )
4153: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4154: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4155: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4156: ,p_ae_header_id => NULL
4157: );
4158: RETURN l_output_value;
4151: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4152: )
4153: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4154: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4155: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4156: ,p_ae_header_id => NULL
4157: );
4158: RETURN l_output_value;
4159: EXCEPTION
4227: (p_msg => 'END of AcctDerRule_28(invalid)'
4228: ,p_level => C_LEVEL_PROCEDURE
4229: ,p_module => l_log_module);
4230: END IF;
4231: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4232: x_value_type_code := null;
4233: l_output_value := null;
4234: xla_accounting_err_pkg.build_message
4235: (p_appli_s_name => 'XLA'
4247: 'XLA_OWNER_TYPE'
4248: ,l_component_type_code
4249: )
4250: ,p_token_3 => 'PAD_NAME'
4251: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4252: ,p_token_4 => 'PAD_OWNER'
4253: ,p_value_4 => xla_lookups_pkg.get_meaning(
4254: 'XLA_OWNER_TYPE'
4255: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4251: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4252: ,p_token_4 => 'PAD_OWNER'
4253: ,p_value_4 => xla_lookups_pkg.get_meaning(
4254: 'XLA_OWNER_TYPE'
4255: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4256: )
4257: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4258: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4259: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4253: ,p_value_4 => xla_lookups_pkg.get_meaning(
4254: 'XLA_OWNER_TYPE'
4255: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4256: )
4257: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4258: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4259: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4260: ,p_ae_header_id => NULL
4261: );
4254: 'XLA_OWNER_TYPE'
4255: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4256: )
4257: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4258: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4259: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4260: ,p_ae_header_id => NULL
4261: );
4262: RETURN l_output_value;
4255: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4256: )
4257: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4258: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4259: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4260: ,p_ae_header_id => NULL
4261: );
4262: RETURN l_output_value;
4263: EXCEPTION
4506: (p_msg => 'END of AcctDerRule_29(invalid)'
4507: ,p_level => C_LEVEL_PROCEDURE
4508: ,p_module => l_log_module);
4509: END IF;
4510: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4511: x_value_type_code := null;
4512: l_output_value := null;
4513: xla_accounting_err_pkg.build_message
4514: (p_appli_s_name => 'XLA'
4526: 'XLA_OWNER_TYPE'
4527: ,l_component_type_code
4528: )
4529: ,p_token_3 => 'PAD_NAME'
4530: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4531: ,p_token_4 => 'PAD_OWNER'
4532: ,p_value_4 => xla_lookups_pkg.get_meaning(
4533: 'XLA_OWNER_TYPE'
4534: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4530: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4531: ,p_token_4 => 'PAD_OWNER'
4532: ,p_value_4 => xla_lookups_pkg.get_meaning(
4533: 'XLA_OWNER_TYPE'
4534: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4535: )
4536: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4537: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4538: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4532: ,p_value_4 => xla_lookups_pkg.get_meaning(
4533: 'XLA_OWNER_TYPE'
4534: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4535: )
4536: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4537: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4538: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4539: ,p_ae_header_id => NULL
4540: );
4533: 'XLA_OWNER_TYPE'
4534: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4535: )
4536: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4537: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4538: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4539: ,p_ae_header_id => NULL
4540: );
4541: RETURN l_output_value;
4534: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4535: )
4536: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4537: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4538: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4539: ,p_ae_header_id => NULL
4540: );
4541: RETURN l_output_value;
4542: EXCEPTION
4671: (p_msg => 'END of AcctDerRule_30(invalid)'
4672: ,p_level => C_LEVEL_PROCEDURE
4673: ,p_module => l_log_module);
4674: END IF;
4675: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4676: x_value_type_code := null;
4677: l_output_value := null;
4678: xla_accounting_err_pkg.build_message
4679: (p_appli_s_name => 'XLA'
4691: 'XLA_OWNER_TYPE'
4692: ,l_component_type_code
4693: )
4694: ,p_token_3 => 'PAD_NAME'
4695: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4696: ,p_token_4 => 'PAD_OWNER'
4697: ,p_value_4 => xla_lookups_pkg.get_meaning(
4698: 'XLA_OWNER_TYPE'
4699: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4695: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4696: ,p_token_4 => 'PAD_OWNER'
4697: ,p_value_4 => xla_lookups_pkg.get_meaning(
4698: 'XLA_OWNER_TYPE'
4699: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4700: )
4701: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4702: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4703: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4697: ,p_value_4 => xla_lookups_pkg.get_meaning(
4698: 'XLA_OWNER_TYPE'
4699: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4700: )
4701: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4702: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4703: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4704: ,p_ae_header_id => NULL
4705: );
4698: 'XLA_OWNER_TYPE'
4699: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4700: )
4701: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4702: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4703: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4704: ,p_ae_header_id => NULL
4705: );
4706: RETURN l_output_value;
4699: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4700: )
4701: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4702: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4703: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4704: ,p_ae_header_id => NULL
4705: );
4706: RETURN l_output_value;
4707: EXCEPTION
4857: (p_msg => 'END of AcctDerRule_31(invalid)'
4858: ,p_level => C_LEVEL_PROCEDURE
4859: ,p_module => l_log_module);
4860: END IF;
4861: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4862: x_value_type_code := null;
4863: l_output_value := null;
4864: xla_accounting_err_pkg.build_message
4865: (p_appli_s_name => 'XLA'
4877: 'XLA_OWNER_TYPE'
4878: ,l_component_type_code
4879: )
4880: ,p_token_3 => 'PAD_NAME'
4881: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4882: ,p_token_4 => 'PAD_OWNER'
4883: ,p_value_4 => xla_lookups_pkg.get_meaning(
4884: 'XLA_OWNER_TYPE'
4885: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4881: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
4882: ,p_token_4 => 'PAD_OWNER'
4883: ,p_value_4 => xla_lookups_pkg.get_meaning(
4884: 'XLA_OWNER_TYPE'
4885: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4886: )
4887: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4888: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4889: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4883: ,p_value_4 => xla_lookups_pkg.get_meaning(
4884: 'XLA_OWNER_TYPE'
4885: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4886: )
4887: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4888: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4889: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4890: ,p_ae_header_id => NULL
4891: );
4884: 'XLA_OWNER_TYPE'
4885: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4886: )
4887: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4888: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4889: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4890: ,p_ae_header_id => NULL
4891: );
4892: RETURN l_output_value;
4885: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
4886: )
4887: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
4888: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
4889: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
4890: ,p_ae_header_id => NULL
4891: );
4892: RETURN l_output_value;
4893: EXCEPTION
4983: (p_msg => 'END of AcctDerRule_32(invalid)'
4984: ,p_level => C_LEVEL_PROCEDURE
4985: ,p_module => l_log_module);
4986: END IF;
4987: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
4988: x_value_type_code := null;
4989: l_output_value := null;
4990: xla_accounting_err_pkg.build_message
4991: (p_appli_s_name => 'XLA'
5003: 'XLA_OWNER_TYPE'
5004: ,l_component_type_code
5005: )
5006: ,p_token_3 => 'PAD_NAME'
5007: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5008: ,p_token_4 => 'PAD_OWNER'
5009: ,p_value_4 => xla_lookups_pkg.get_meaning(
5010: 'XLA_OWNER_TYPE'
5011: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5007: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5008: ,p_token_4 => 'PAD_OWNER'
5009: ,p_value_4 => xla_lookups_pkg.get_meaning(
5010: 'XLA_OWNER_TYPE'
5011: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5012: )
5013: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5014: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5015: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5009: ,p_value_4 => xla_lookups_pkg.get_meaning(
5010: 'XLA_OWNER_TYPE'
5011: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5012: )
5013: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5014: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5015: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5016: ,p_ae_header_id => NULL
5017: );
5010: 'XLA_OWNER_TYPE'
5011: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5012: )
5013: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5014: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5015: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5016: ,p_ae_header_id => NULL
5017: );
5018: RETURN l_output_value;
5011: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5012: )
5013: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5014: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5015: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5016: ,p_ae_header_id => NULL
5017: );
5018: RETURN l_output_value;
5019: EXCEPTION
5087: (p_msg => 'END of AcctDerRule_33(invalid)'
5088: ,p_level => C_LEVEL_PROCEDURE
5089: ,p_module => l_log_module);
5090: END IF;
5091: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5092: x_value_type_code := null;
5093: l_output_value := null;
5094: xla_accounting_err_pkg.build_message
5095: (p_appli_s_name => 'XLA'
5107: 'XLA_OWNER_TYPE'
5108: ,l_component_type_code
5109: )
5110: ,p_token_3 => 'PAD_NAME'
5111: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5112: ,p_token_4 => 'PAD_OWNER'
5113: ,p_value_4 => xla_lookups_pkg.get_meaning(
5114: 'XLA_OWNER_TYPE'
5115: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5111: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5112: ,p_token_4 => 'PAD_OWNER'
5113: ,p_value_4 => xla_lookups_pkg.get_meaning(
5114: 'XLA_OWNER_TYPE'
5115: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5116: )
5117: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5118: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5119: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5113: ,p_value_4 => xla_lookups_pkg.get_meaning(
5114: 'XLA_OWNER_TYPE'
5115: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5116: )
5117: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5118: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5119: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5120: ,p_ae_header_id => NULL
5121: );
5114: 'XLA_OWNER_TYPE'
5115: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5116: )
5117: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5118: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5119: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5120: ,p_ae_header_id => NULL
5121: );
5122: RETURN l_output_value;
5115: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5116: )
5117: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5118: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5119: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5120: ,p_ae_header_id => NULL
5121: );
5122: RETURN l_output_value;
5123: EXCEPTION
5191: (p_msg => 'END of AcctDerRule_34(invalid)'
5192: ,p_level => C_LEVEL_PROCEDURE
5193: ,p_module => l_log_module);
5194: END IF;
5195: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5196: x_value_type_code := null;
5197: l_output_value := null;
5198: xla_accounting_err_pkg.build_message
5199: (p_appli_s_name => 'XLA'
5211: 'XLA_OWNER_TYPE'
5212: ,l_component_type_code
5213: )
5214: ,p_token_3 => 'PAD_NAME'
5215: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5216: ,p_token_4 => 'PAD_OWNER'
5217: ,p_value_4 => xla_lookups_pkg.get_meaning(
5218: 'XLA_OWNER_TYPE'
5219: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5215: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5216: ,p_token_4 => 'PAD_OWNER'
5217: ,p_value_4 => xla_lookups_pkg.get_meaning(
5218: 'XLA_OWNER_TYPE'
5219: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5220: )
5221: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5222: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5223: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5217: ,p_value_4 => xla_lookups_pkg.get_meaning(
5218: 'XLA_OWNER_TYPE'
5219: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5220: )
5221: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5222: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5223: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5224: ,p_ae_header_id => NULL
5225: );
5218: 'XLA_OWNER_TYPE'
5219: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5220: )
5221: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5222: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5223: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5224: ,p_ae_header_id => NULL
5225: );
5226: RETURN l_output_value;
5219: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5220: )
5221: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5222: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5223: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5224: ,p_ae_header_id => NULL
5225: );
5226: RETURN l_output_value;
5227: EXCEPTION
5295: (p_msg => 'END of AcctDerRule_35(invalid)'
5296: ,p_level => C_LEVEL_PROCEDURE
5297: ,p_module => l_log_module);
5298: END IF;
5299: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5300: x_value_type_code := null;
5301: l_output_value := null;
5302: xla_accounting_err_pkg.build_message
5303: (p_appli_s_name => 'XLA'
5315: 'XLA_OWNER_TYPE'
5316: ,l_component_type_code
5317: )
5318: ,p_token_3 => 'PAD_NAME'
5319: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5320: ,p_token_4 => 'PAD_OWNER'
5321: ,p_value_4 => xla_lookups_pkg.get_meaning(
5322: 'XLA_OWNER_TYPE'
5323: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5319: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5320: ,p_token_4 => 'PAD_OWNER'
5321: ,p_value_4 => xla_lookups_pkg.get_meaning(
5322: 'XLA_OWNER_TYPE'
5323: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5324: )
5325: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5326: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5327: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5321: ,p_value_4 => xla_lookups_pkg.get_meaning(
5322: 'XLA_OWNER_TYPE'
5323: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5324: )
5325: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5326: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5327: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5328: ,p_ae_header_id => NULL
5329: );
5322: 'XLA_OWNER_TYPE'
5323: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5324: )
5325: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5326: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5327: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5328: ,p_ae_header_id => NULL
5329: );
5330: RETURN l_output_value;
5323: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5324: )
5325: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5326: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5327: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5328: ,p_ae_header_id => NULL
5329: );
5330: RETURN l_output_value;
5331: EXCEPTION
5433: (p_msg => 'END of AcctDerRule_36(invalid)'
5434: ,p_level => C_LEVEL_PROCEDURE
5435: ,p_module => l_log_module);
5436: END IF;
5437: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5438: x_value_type_code := null;
5439: l_output_value := null;
5440: xla_accounting_err_pkg.build_message
5441: (p_appli_s_name => 'XLA'
5453: 'XLA_OWNER_TYPE'
5454: ,l_component_type_code
5455: )
5456: ,p_token_3 => 'PAD_NAME'
5457: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5458: ,p_token_4 => 'PAD_OWNER'
5459: ,p_value_4 => xla_lookups_pkg.get_meaning(
5460: 'XLA_OWNER_TYPE'
5461: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5457: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5458: ,p_token_4 => 'PAD_OWNER'
5459: ,p_value_4 => xla_lookups_pkg.get_meaning(
5460: 'XLA_OWNER_TYPE'
5461: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5462: )
5463: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5464: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5465: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5459: ,p_value_4 => xla_lookups_pkg.get_meaning(
5460: 'XLA_OWNER_TYPE'
5461: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5462: )
5463: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5464: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5465: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5466: ,p_ae_header_id => NULL
5467: );
5460: 'XLA_OWNER_TYPE'
5461: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5462: )
5463: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5464: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5465: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5466: ,p_ae_header_id => NULL
5467: );
5468: RETURN l_output_value;
5461: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5462: )
5463: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5464: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5465: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5466: ,p_ae_header_id => NULL
5467: );
5468: RETURN l_output_value;
5469: EXCEPTION
5576: (p_msg => 'END of AcctDerRule_37(invalid)'
5577: ,p_level => C_LEVEL_PROCEDURE
5578: ,p_module => l_log_module);
5579: END IF;
5580: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5581: x_value_type_code := null;
5582: l_output_value := null;
5583: xla_accounting_err_pkg.build_message
5584: (p_appli_s_name => 'XLA'
5596: 'XLA_OWNER_TYPE'
5597: ,l_component_type_code
5598: )
5599: ,p_token_3 => 'PAD_NAME'
5600: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5601: ,p_token_4 => 'PAD_OWNER'
5602: ,p_value_4 => xla_lookups_pkg.get_meaning(
5603: 'XLA_OWNER_TYPE'
5604: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5600: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5601: ,p_token_4 => 'PAD_OWNER'
5602: ,p_value_4 => xla_lookups_pkg.get_meaning(
5603: 'XLA_OWNER_TYPE'
5604: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5605: )
5606: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5607: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5608: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5602: ,p_value_4 => xla_lookups_pkg.get_meaning(
5603: 'XLA_OWNER_TYPE'
5604: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5605: )
5606: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5607: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5608: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5609: ,p_ae_header_id => NULL
5610: );
5603: 'XLA_OWNER_TYPE'
5604: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5605: )
5606: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5607: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5608: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5609: ,p_ae_header_id => NULL
5610: );
5611: RETURN l_output_value;
5604: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5605: )
5606: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5607: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5608: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5609: ,p_ae_header_id => NULL
5610: );
5611: RETURN l_output_value;
5612: EXCEPTION
5719: (p_msg => 'END of AcctDerRule_38(invalid)'
5720: ,p_level => C_LEVEL_PROCEDURE
5721: ,p_module => l_log_module);
5722: END IF;
5723: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5724: x_value_type_code := null;
5725: l_output_value := null;
5726: xla_accounting_err_pkg.build_message
5727: (p_appli_s_name => 'XLA'
5739: 'XLA_OWNER_TYPE'
5740: ,l_component_type_code
5741: )
5742: ,p_token_3 => 'PAD_NAME'
5743: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5744: ,p_token_4 => 'PAD_OWNER'
5745: ,p_value_4 => xla_lookups_pkg.get_meaning(
5746: 'XLA_OWNER_TYPE'
5747: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5743: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5744: ,p_token_4 => 'PAD_OWNER'
5745: ,p_value_4 => xla_lookups_pkg.get_meaning(
5746: 'XLA_OWNER_TYPE'
5747: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5748: )
5749: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5750: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5751: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5745: ,p_value_4 => xla_lookups_pkg.get_meaning(
5746: 'XLA_OWNER_TYPE'
5747: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5748: )
5749: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5750: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5751: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5752: ,p_ae_header_id => NULL
5753: );
5746: 'XLA_OWNER_TYPE'
5747: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5748: )
5749: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5750: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5751: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5752: ,p_ae_header_id => NULL
5753: );
5754: RETURN l_output_value;
5747: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5748: )
5749: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5750: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5751: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5752: ,p_ae_header_id => NULL
5753: );
5754: RETURN l_output_value;
5755: EXCEPTION
5846: (p_msg => 'END of AcctDerRule_39(invalid)'
5847: ,p_level => C_LEVEL_PROCEDURE
5848: ,p_module => l_log_module);
5849: END IF;
5850: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5851: x_value_type_code := null;
5852: l_output_value := null;
5853: xla_accounting_err_pkg.build_message
5854: (p_appli_s_name => 'XLA'
5866: 'XLA_OWNER_TYPE'
5867: ,l_component_type_code
5868: )
5869: ,p_token_3 => 'PAD_NAME'
5870: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5871: ,p_token_4 => 'PAD_OWNER'
5872: ,p_value_4 => xla_lookups_pkg.get_meaning(
5873: 'XLA_OWNER_TYPE'
5874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5870: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5871: ,p_token_4 => 'PAD_OWNER'
5872: ,p_value_4 => xla_lookups_pkg.get_meaning(
5873: 'XLA_OWNER_TYPE'
5874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5875: )
5876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5872: ,p_value_4 => xla_lookups_pkg.get_meaning(
5873: 'XLA_OWNER_TYPE'
5874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5875: )
5876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5879: ,p_ae_header_id => NULL
5880: );
5873: 'XLA_OWNER_TYPE'
5874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5875: )
5876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5879: ,p_ae_header_id => NULL
5880: );
5881: RETURN l_output_value;
5874: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5875: )
5876: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
5877: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
5878: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5879: ,p_ae_header_id => NULL
5880: );
5881: RETURN l_output_value;
5882: EXCEPTION
5973: (p_msg => 'END of AcctDerRule_40(invalid)'
5974: ,p_level => C_LEVEL_PROCEDURE
5975: ,p_module => l_log_module);
5976: END IF;
5977: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
5978: x_value_type_code := null;
5979: l_output_value := null;
5980: xla_accounting_err_pkg.build_message
5981: (p_appli_s_name => 'XLA'
5993: 'XLA_OWNER_TYPE'
5994: ,l_component_type_code
5995: )
5996: ,p_token_3 => 'PAD_NAME'
5997: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5998: ,p_token_4 => 'PAD_OWNER'
5999: ,p_value_4 => xla_lookups_pkg.get_meaning(
6000: 'XLA_OWNER_TYPE'
6001: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
5997: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
5998: ,p_token_4 => 'PAD_OWNER'
5999: ,p_value_4 => xla_lookups_pkg.get_meaning(
6000: 'XLA_OWNER_TYPE'
6001: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6002: )
6003: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6004: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6005: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
5999: ,p_value_4 => xla_lookups_pkg.get_meaning(
6000: 'XLA_OWNER_TYPE'
6001: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6002: )
6003: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6004: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6005: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6006: ,p_ae_header_id => NULL
6007: );
6000: 'XLA_OWNER_TYPE'
6001: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6002: )
6003: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6004: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6005: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6006: ,p_ae_header_id => NULL
6007: );
6008: RETURN l_output_value;
6001: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6002: )
6003: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6004: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6005: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6006: ,p_ae_header_id => NULL
6007: );
6008: RETURN l_output_value;
6009: EXCEPTION
6077: (p_msg => 'END of AcctDerRule_41(invalid)'
6078: ,p_level => C_LEVEL_PROCEDURE
6079: ,p_module => l_log_module);
6080: END IF;
6081: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
6082: x_value_type_code := null;
6083: l_output_value := null;
6084: xla_accounting_err_pkg.build_message
6085: (p_appli_s_name => 'XLA'
6097: 'XLA_OWNER_TYPE'
6098: ,l_component_type_code
6099: )
6100: ,p_token_3 => 'PAD_NAME'
6101: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6102: ,p_token_4 => 'PAD_OWNER'
6103: ,p_value_4 => xla_lookups_pkg.get_meaning(
6104: 'XLA_OWNER_TYPE'
6105: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6101: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6102: ,p_token_4 => 'PAD_OWNER'
6103: ,p_value_4 => xla_lookups_pkg.get_meaning(
6104: 'XLA_OWNER_TYPE'
6105: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6106: )
6107: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6108: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6109: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6103: ,p_value_4 => xla_lookups_pkg.get_meaning(
6104: 'XLA_OWNER_TYPE'
6105: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6106: )
6107: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6108: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6109: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6110: ,p_ae_header_id => NULL
6111: );
6104: 'XLA_OWNER_TYPE'
6105: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6106: )
6107: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6108: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6109: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6110: ,p_ae_header_id => NULL
6111: );
6112: RETURN l_output_value;
6105: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6106: )
6107: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6108: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6109: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6110: ,p_ae_header_id => NULL
6111: );
6112: RETURN l_output_value;
6113: EXCEPTION
6181: (p_msg => 'END of AcctDerRule_42(invalid)'
6182: ,p_level => C_LEVEL_PROCEDURE
6183: ,p_module => l_log_module);
6184: END IF;
6185: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
6186: x_value_type_code := null;
6187: l_output_value := null;
6188: xla_accounting_err_pkg.build_message
6189: (p_appli_s_name => 'XLA'
6201: 'XLA_OWNER_TYPE'
6202: ,l_component_type_code
6203: )
6204: ,p_token_3 => 'PAD_NAME'
6205: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6206: ,p_token_4 => 'PAD_OWNER'
6207: ,p_value_4 => xla_lookups_pkg.get_meaning(
6208: 'XLA_OWNER_TYPE'
6209: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6205: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6206: ,p_token_4 => 'PAD_OWNER'
6207: ,p_value_4 => xla_lookups_pkg.get_meaning(
6208: 'XLA_OWNER_TYPE'
6209: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6210: )
6211: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6212: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6213: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6207: ,p_value_4 => xla_lookups_pkg.get_meaning(
6208: 'XLA_OWNER_TYPE'
6209: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6210: )
6211: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6212: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6213: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6214: ,p_ae_header_id => NULL
6215: );
6208: 'XLA_OWNER_TYPE'
6209: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6210: )
6211: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6212: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6213: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6214: ,p_ae_header_id => NULL
6215: );
6216: RETURN l_output_value;
6209: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6210: )
6211: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6212: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6213: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6214: ,p_ae_header_id => NULL
6215: );
6216: RETURN l_output_value;
6217: EXCEPTION
6285: (p_msg => 'END of AcctDerRule_43(invalid)'
6286: ,p_level => C_LEVEL_PROCEDURE
6287: ,p_module => l_log_module);
6288: END IF;
6289: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
6290: x_value_type_code := null;
6291: l_output_value := null;
6292: xla_accounting_err_pkg.build_message
6293: (p_appli_s_name => 'XLA'
6305: 'XLA_OWNER_TYPE'
6306: ,l_component_type_code
6307: )
6308: ,p_token_3 => 'PAD_NAME'
6309: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6310: ,p_token_4 => 'PAD_OWNER'
6311: ,p_value_4 => xla_lookups_pkg.get_meaning(
6312: 'XLA_OWNER_TYPE'
6313: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6309: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6310: ,p_token_4 => 'PAD_OWNER'
6311: ,p_value_4 => xla_lookups_pkg.get_meaning(
6312: 'XLA_OWNER_TYPE'
6313: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6314: )
6315: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6316: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6317: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6311: ,p_value_4 => xla_lookups_pkg.get_meaning(
6312: 'XLA_OWNER_TYPE'
6313: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6314: )
6315: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6316: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6317: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6318: ,p_ae_header_id => NULL
6319: );
6312: 'XLA_OWNER_TYPE'
6313: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6314: )
6315: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6316: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6317: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6318: ,p_ae_header_id => NULL
6319: );
6320: RETURN l_output_value;
6313: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6314: )
6315: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6316: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6317: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6318: ,p_ae_header_id => NULL
6319: );
6320: RETURN l_output_value;
6321: EXCEPTION
6412: (p_msg => 'END of AcctDerRule_44(invalid)'
6413: ,p_level => C_LEVEL_PROCEDURE
6414: ,p_module => l_log_module);
6415: END IF;
6416: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
6417: x_value_type_code := null;
6418: l_output_value := null;
6419: xla_accounting_err_pkg.build_message
6420: (p_appli_s_name => 'XLA'
6432: 'XLA_OWNER_TYPE'
6433: ,l_component_type_code
6434: )
6435: ,p_token_3 => 'PAD_NAME'
6436: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6437: ,p_token_4 => 'PAD_OWNER'
6438: ,p_value_4 => xla_lookups_pkg.get_meaning(
6439: 'XLA_OWNER_TYPE'
6440: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6436: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6437: ,p_token_4 => 'PAD_OWNER'
6438: ,p_value_4 => xla_lookups_pkg.get_meaning(
6439: 'XLA_OWNER_TYPE'
6440: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6441: )
6442: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6443: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6444: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6438: ,p_value_4 => xla_lookups_pkg.get_meaning(
6439: 'XLA_OWNER_TYPE'
6440: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6441: )
6442: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6443: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6444: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6445: ,p_ae_header_id => NULL
6446: );
6439: 'XLA_OWNER_TYPE'
6440: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6441: )
6442: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6443: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6444: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6445: ,p_ae_header_id => NULL
6446: );
6447: RETURN l_output_value;
6440: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6441: )
6442: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6443: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6444: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6445: ,p_ae_header_id => NULL
6446: );
6447: RETURN l_output_value;
6448: EXCEPTION
6539: (p_msg => 'END of AcctDerRule_45(invalid)'
6540: ,p_level => C_LEVEL_PROCEDURE
6541: ,p_module => l_log_module);
6542: END IF;
6543: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
6544: x_value_type_code := null;
6545: l_output_value := null;
6546: xla_accounting_err_pkg.build_message
6547: (p_appli_s_name => 'XLA'
6559: 'XLA_OWNER_TYPE'
6560: ,l_component_type_code
6561: )
6562: ,p_token_3 => 'PAD_NAME'
6563: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6564: ,p_token_4 => 'PAD_OWNER'
6565: ,p_value_4 => xla_lookups_pkg.get_meaning(
6566: 'XLA_OWNER_TYPE'
6567: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6563: ,p_value_3 => xla_ae_journal_entry_pkg.g_cache_pad.pad_session_name
6564: ,p_token_4 => 'PAD_OWNER'
6565: ,p_value_4 => xla_lookups_pkg.get_meaning(
6566: 'XLA_OWNER_TYPE'
6567: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6568: )
6569: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6570: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6571: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6565: ,p_value_4 => xla_lookups_pkg.get_meaning(
6566: 'XLA_OWNER_TYPE'
6567: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6568: )
6569: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6570: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6571: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6572: ,p_ae_header_id => NULL
6573: );
6566: 'XLA_OWNER_TYPE'
6567: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6568: )
6569: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6570: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6571: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6572: ,p_ae_header_id => NULL
6573: );
6574: RETURN l_output_value;
6567: ,xla_ae_journal_entry_pkg.g_cache_pad.product_rule_type_code
6568: )
6569: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
6570: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
6571: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id
6572: ,p_ae_header_id => NULL
6573: );
6574: RETURN l_output_value;
6575: EXCEPTION
6717: l_tmp_amt NUMBER;
6718: l_acc_rev_natural_side_code VARCHAR2(1);
6719:
6720: l_num_entries NUMBER;
6721: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6722: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6723: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6724: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6725: l_recog_line_1 NUMBER;
6718: l_acc_rev_natural_side_code VARCHAR2(1);
6719:
6720: l_num_entries NUMBER;
6721: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6722: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6723: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6724: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6725: l_recog_line_1 NUMBER;
6726: l_recog_line_2 NUMBER;
6719:
6720: l_num_entries NUMBER;
6721: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6722: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6723: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6724: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6725: l_recog_line_1 NUMBER;
6726: l_recog_line_2 NUMBER;
6727:
6720: l_num_entries NUMBER;
6721: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
6722: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
6723: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
6724: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
6725: l_recog_line_1 NUMBER;
6726: l_recog_line_2 NUMBER;
6727:
6728: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
6726: l_recog_line_2 NUMBER;
6727:
6728: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
6729: l_bflow_applied_to_amt NUMBER; -- 5132302
6730: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
6731:
6732: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
6733:
6734: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
6801: l_accrual_line_num := NULL; -- 4262811
6802: l_tmp_amt := NULL; -- 4262811
6803: --
6804:
6805: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
6806: l_balance_type_code <> 'B' THEN
6807: IF NVL(p_source_33,'
6808: ') = 'RETROACCRUAL' OR
6809: NVL(p_source_33,'
6875: --
6876: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
6877:
6878: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
6879: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
6880:
6881: -- 4955764
6882: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
6883: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
6999: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
7000:
7001: IF xla_accounting_cache_pkg.GetValueChar
7002: (p_source_code => 'LEDGER_CATEGORY_CODE'
7003: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
7004: AND l_bflow_method_code = 'PRIOR_ENTRY'
7005: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
7006: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
7007: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
7109: p_lookup_type => 'XLA_OWNER_TYPE'
7110: ,p_lookup_code => l_component_type_code
7111: )
7112: ,p_token_4 => 'PRODUCT_NAME'
7113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7117: ,p_ae_header_id => NULL
7110: ,p_lookup_code => l_component_type_code
7111: )
7112: ,p_token_4 => 'PRODUCT_NAME'
7113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7117: ,p_ae_header_id => NULL
7118: );
7111: )
7112: ,p_token_4 => 'PRODUCT_NAME'
7113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7117: ,p_ae_header_id => NULL
7118: );
7119:
7112: ,p_token_4 => 'PRODUCT_NAME'
7113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7117: ,p_ae_header_id => NULL
7118: );
7119:
7120: IF (C_LEVEL_ERROR>= g_log_level) THEN
7143: ----------------------------------------------------------------------------------
7144: -- 4219869 Business Flow
7145: -- Update journal entry status -- Need to generate this within IF
7146: ----------------------------------------------------------------------------------
7147: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7148: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
7149: ,p_balance_type_code => l_balance_type_code
7150: );
7151:
7230:
7231: --
7232: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
7233: --
7234: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
7235: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
7236: ELSE
7237: ---------------------------------------------------------------------------------------------------
7238: -- 4262811a Switch Sign
7255:
7256: XLA_AE_LINES_PKG.ValidateCurrentLine;
7257: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
7258:
7259: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7260: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
7261: ,p_balance_type_code => l_balance_type_code);
7262:
7263: END IF;
7423: l_tmp_amt NUMBER;
7424: l_acc_rev_natural_side_code VARCHAR2(1);
7425:
7426: l_num_entries NUMBER;
7427: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7428: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7429: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7430: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7431: l_recog_line_1 NUMBER;
7424: l_acc_rev_natural_side_code VARCHAR2(1);
7425:
7426: l_num_entries NUMBER;
7427: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7428: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7429: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7430: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7431: l_recog_line_1 NUMBER;
7432: l_recog_line_2 NUMBER;
7425:
7426: l_num_entries NUMBER;
7427: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7428: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7429: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7430: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7431: l_recog_line_1 NUMBER;
7432: l_recog_line_2 NUMBER;
7433:
7426: l_num_entries NUMBER;
7427: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
7428: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
7429: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
7430: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
7431: l_recog_line_1 NUMBER;
7432: l_recog_line_2 NUMBER;
7433:
7434: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
7432: l_recog_line_2 NUMBER;
7433:
7434: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
7435: l_bflow_applied_to_amt NUMBER; -- 5132302
7436: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
7437:
7438: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
7439:
7440: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
7507: l_accrual_line_num := NULL; -- 4262811
7508: l_tmp_amt := NULL; -- 4262811
7509: --
7510:
7511: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
7512: l_balance_type_code <> 'B' THEN
7513: IF NVL(p_source_33,'
7514: ') = 'RETROACCRUAL' OR
7515: NVL(p_source_33,'
7581: --
7582: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
7583:
7584: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
7585: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
7586:
7587: -- 4955764
7588: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
7589: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
7703: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
7704:
7705: IF xla_accounting_cache_pkg.GetValueChar
7706: (p_source_code => 'LEDGER_CATEGORY_CODE'
7707: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
7708: AND l_bflow_method_code = 'PRIOR_ENTRY'
7709: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
7710: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
7711: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
7813: p_lookup_type => 'XLA_OWNER_TYPE'
7814: ,p_lookup_code => l_component_type_code
7815: )
7816: ,p_token_4 => 'PRODUCT_NAME'
7817: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7818: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7819: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7820: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7821: ,p_ae_header_id => NULL
7814: ,p_lookup_code => l_component_type_code
7815: )
7816: ,p_token_4 => 'PRODUCT_NAME'
7817: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7818: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7819: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7820: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7821: ,p_ae_header_id => NULL
7822: );
7815: )
7816: ,p_token_4 => 'PRODUCT_NAME'
7817: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7818: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7819: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7820: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7821: ,p_ae_header_id => NULL
7822: );
7823:
7816: ,p_token_4 => 'PRODUCT_NAME'
7817: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
7818: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
7819: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
7820: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
7821: ,p_ae_header_id => NULL
7822: );
7823:
7824: IF (C_LEVEL_ERROR>= g_log_level) THEN
7847: ----------------------------------------------------------------------------------
7848: -- 4219869 Business Flow
7849: -- Update journal entry status -- Need to generate this within IF
7850: ----------------------------------------------------------------------------------
7851: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7852: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
7853: ,p_balance_type_code => l_balance_type_code
7854: );
7855:
7934:
7935: --
7936: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
7937: --
7938: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
7939: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
7940: ELSE
7941: ---------------------------------------------------------------------------------------------------
7942: -- 4262811a Switch Sign
7959:
7960: XLA_AE_LINES_PKG.ValidateCurrentLine;
7961: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
7962:
7963: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
7964: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
7965: ,p_balance_type_code => l_balance_type_code);
7966:
7967: END IF;
8129: l_tmp_amt NUMBER;
8130: l_acc_rev_natural_side_code VARCHAR2(1);
8131:
8132: l_num_entries NUMBER;
8133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8137: l_recog_line_1 NUMBER;
8130: l_acc_rev_natural_side_code VARCHAR2(1);
8131:
8132: l_num_entries NUMBER;
8133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8137: l_recog_line_1 NUMBER;
8138: l_recog_line_2 NUMBER;
8131:
8132: l_num_entries NUMBER;
8133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8137: l_recog_line_1 NUMBER;
8138: l_recog_line_2 NUMBER;
8139:
8132: l_num_entries NUMBER;
8133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8137: l_recog_line_1 NUMBER;
8138: l_recog_line_2 NUMBER;
8139:
8140: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
8138: l_recog_line_2 NUMBER;
8139:
8140: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
8141: l_bflow_applied_to_amt NUMBER; -- 5132302
8142: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
8143:
8144: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
8145:
8146: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
8213: l_accrual_line_num := NULL; -- 4262811
8214: l_tmp_amt := NULL; -- 4262811
8215: --
8216:
8217: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
8218: l_balance_type_code <> 'B' THEN
8219: IF NVL(p_source_33,'
8220: ') = 'RETROACCRUAL' OR
8221: NVL(p_source_33,'
8287: --
8288: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
8289:
8290: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
8291: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
8292:
8293: -- 4955764
8294: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
8295: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
8413: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
8414:
8415: IF xla_accounting_cache_pkg.GetValueChar
8416: (p_source_code => 'LEDGER_CATEGORY_CODE'
8417: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
8418: AND l_bflow_method_code = 'PRIOR_ENTRY'
8419: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
8420: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
8421: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
8523: p_lookup_type => 'XLA_OWNER_TYPE'
8524: ,p_lookup_code => l_component_type_code
8525: )
8526: ,p_token_4 => 'PRODUCT_NAME'
8527: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8528: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8529: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8530: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8531: ,p_ae_header_id => NULL
8524: ,p_lookup_code => l_component_type_code
8525: )
8526: ,p_token_4 => 'PRODUCT_NAME'
8527: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8528: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8529: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8530: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8531: ,p_ae_header_id => NULL
8532: );
8525: )
8526: ,p_token_4 => 'PRODUCT_NAME'
8527: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8528: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8529: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8530: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8531: ,p_ae_header_id => NULL
8532: );
8533:
8526: ,p_token_4 => 'PRODUCT_NAME'
8527: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
8528: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
8529: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
8530: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
8531: ,p_ae_header_id => NULL
8532: );
8533:
8534: IF (C_LEVEL_ERROR>= g_log_level) THEN
8557: ----------------------------------------------------------------------------------
8558: -- 4219869 Business Flow
8559: -- Update journal entry status -- Need to generate this within IF
8560: ----------------------------------------------------------------------------------
8561: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
8562: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
8563: ,p_balance_type_code => l_balance_type_code
8564: );
8565:
8644:
8645: --
8646: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
8647: --
8648: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
8649: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
8650: ELSE
8651: ---------------------------------------------------------------------------------------------------
8652: -- 4262811a Switch Sign
8669:
8670: XLA_AE_LINES_PKG.ValidateCurrentLine;
8671: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
8672:
8673: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
8674: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
8675: ,p_balance_type_code => l_balance_type_code);
8676:
8677: END IF;
8839: l_tmp_amt NUMBER;
8840: l_acc_rev_natural_side_code VARCHAR2(1);
8841:
8842: l_num_entries NUMBER;
8843: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8844: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8845: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8846: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8847: l_recog_line_1 NUMBER;
8840: l_acc_rev_natural_side_code VARCHAR2(1);
8841:
8842: l_num_entries NUMBER;
8843: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8844: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8845: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8846: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8847: l_recog_line_1 NUMBER;
8848: l_recog_line_2 NUMBER;
8841:
8842: l_num_entries NUMBER;
8843: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8844: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8845: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8846: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8847: l_recog_line_1 NUMBER;
8848: l_recog_line_2 NUMBER;
8849:
8842: l_num_entries NUMBER;
8843: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
8844: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
8845: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
8846: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
8847: l_recog_line_1 NUMBER;
8848: l_recog_line_2 NUMBER;
8849:
8850: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
8848: l_recog_line_2 NUMBER;
8849:
8850: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
8851: l_bflow_applied_to_amt NUMBER; -- 5132302
8852: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
8853:
8854: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
8855:
8856: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
8923: l_accrual_line_num := NULL; -- 4262811
8924: l_tmp_amt := NULL; -- 4262811
8925: --
8926:
8927: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
8928: l_balance_type_code <> 'B' THEN
8929: IF NVL(p_source_33,'
8930: ') = 'RETROACCRUAL' OR
8931: NVL(p_source_33,'
8997: --
8998: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
8999:
9000: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
9001: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
9002:
9003: -- 4955764
9004: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
9005: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
9121: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
9122:
9123: IF xla_accounting_cache_pkg.GetValueChar
9124: (p_source_code => 'LEDGER_CATEGORY_CODE'
9125: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
9126: AND l_bflow_method_code = 'PRIOR_ENTRY'
9127: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
9128: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
9129: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
9231: p_lookup_type => 'XLA_OWNER_TYPE'
9232: ,p_lookup_code => l_component_type_code
9233: )
9234: ,p_token_4 => 'PRODUCT_NAME'
9235: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9236: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9237: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9238: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9239: ,p_ae_header_id => NULL
9232: ,p_lookup_code => l_component_type_code
9233: )
9234: ,p_token_4 => 'PRODUCT_NAME'
9235: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9236: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9237: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9238: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9239: ,p_ae_header_id => NULL
9240: );
9233: )
9234: ,p_token_4 => 'PRODUCT_NAME'
9235: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9236: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9237: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9238: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9239: ,p_ae_header_id => NULL
9240: );
9241:
9234: ,p_token_4 => 'PRODUCT_NAME'
9235: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
9236: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
9237: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
9238: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
9239: ,p_ae_header_id => NULL
9240: );
9241:
9242: IF (C_LEVEL_ERROR>= g_log_level) THEN
9265: ----------------------------------------------------------------------------------
9266: -- 4219869 Business Flow
9267: -- Update journal entry status -- Need to generate this within IF
9268: ----------------------------------------------------------------------------------
9269: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
9270: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
9271: ,p_balance_type_code => l_balance_type_code
9272: );
9273:
9352:
9353: --
9354: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
9355: --
9356: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
9357: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
9358: ELSE
9359: ---------------------------------------------------------------------------------------------------
9360: -- 4262811a Switch Sign
9377:
9378: XLA_AE_LINES_PKG.ValidateCurrentLine;
9379: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
9380:
9381: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
9382: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
9383: ,p_balance_type_code => l_balance_type_code);
9384:
9385: END IF;
9552: l_tmp_amt NUMBER;
9553: l_acc_rev_natural_side_code VARCHAR2(1);
9554:
9555: l_num_entries NUMBER;
9556: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9557: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9558: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9559: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9560: l_recog_line_1 NUMBER;
9553: l_acc_rev_natural_side_code VARCHAR2(1);
9554:
9555: l_num_entries NUMBER;
9556: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9557: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9558: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9559: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9560: l_recog_line_1 NUMBER;
9561: l_recog_line_2 NUMBER;
9554:
9555: l_num_entries NUMBER;
9556: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9557: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9558: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9559: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9560: l_recog_line_1 NUMBER;
9561: l_recog_line_2 NUMBER;
9562:
9555: l_num_entries NUMBER;
9556: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
9557: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
9558: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
9559: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
9560: l_recog_line_1 NUMBER;
9561: l_recog_line_2 NUMBER;
9562:
9563: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
9561: l_recog_line_2 NUMBER;
9562:
9563: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
9564: l_bflow_applied_to_amt NUMBER; -- 5132302
9565: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
9566:
9567: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
9568:
9569: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
9635: l_acc_rev_flag := NULL; -- 4262811
9636: l_accrual_line_num := NULL; -- 4262811
9637: l_tmp_amt := NULL; -- 4262811
9638: --
9639: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
9640: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
9641: return;
9642: END IF;
9643:
9636: l_accrual_line_num := NULL; -- 4262811
9637: l_tmp_amt := NULL; -- 4262811
9638: --
9639: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
9640: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
9641: return;
9642: END IF;
9643:
9644: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
9640: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
9641: return;
9642: END IF;
9643:
9644: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
9645: l_balance_type_code <> 'B' THEN
9646: IF NVL(p_source_33,'
9647: ') = 'ACCRUAL'
9648: THEN
9712: --
9713: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
9714:
9715: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
9716: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
9717:
9718: -- 4955764
9719: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
9720: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
9826: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
9827:
9828: IF xla_accounting_cache_pkg.GetValueChar
9829: (p_source_code => 'LEDGER_CATEGORY_CODE'
9830: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
9831: AND l_bflow_method_code = 'PRIOR_ENTRY'
9832: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
9833: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
9834: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
10080: p_lookup_type => 'XLA_OWNER_TYPE'
10081: ,p_lookup_code => l_component_type_code
10082: )
10083: ,p_token_4 => 'PRODUCT_NAME'
10084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10088: ,p_ae_header_id => NULL
10081: ,p_lookup_code => l_component_type_code
10082: )
10083: ,p_token_4 => 'PRODUCT_NAME'
10084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10088: ,p_ae_header_id => NULL
10089: );
10082: )
10083: ,p_token_4 => 'PRODUCT_NAME'
10084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10088: ,p_ae_header_id => NULL
10089: );
10090:
10083: ,p_token_4 => 'PRODUCT_NAME'
10084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
10085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
10086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
10087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
10088: ,p_ae_header_id => NULL
10089: );
10090:
10091: IF (C_LEVEL_ERROR>= g_log_level) THEN
10114: ----------------------------------------------------------------------------------
10115: -- 4219869 Business Flow
10116: -- Update journal entry status -- Need to generate this within IF
10117: ----------------------------------------------------------------------------------
10118: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
10119: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
10120: ,p_balance_type_code => l_balance_type_code
10121: );
10122:
10345:
10346: --
10347: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
10348: --
10349: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
10350: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
10351: ELSE
10352: ---------------------------------------------------------------------------------------------------
10353: -- 4262811a Switch Sign
10370:
10371: XLA_AE_LINES_PKG.ValidateCurrentLine;
10372: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
10373:
10374: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
10375: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
10376: ,p_balance_type_code => l_balance_type_code);
10377:
10378: END IF;
10543: l_tmp_amt NUMBER;
10544: l_acc_rev_natural_side_code VARCHAR2(1);
10545:
10546: l_num_entries NUMBER;
10547: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10548: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10549: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10550: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10551: l_recog_line_1 NUMBER;
10544: l_acc_rev_natural_side_code VARCHAR2(1);
10545:
10546: l_num_entries NUMBER;
10547: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10548: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10549: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10550: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10551: l_recog_line_1 NUMBER;
10552: l_recog_line_2 NUMBER;
10545:
10546: l_num_entries NUMBER;
10547: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10548: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10549: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10550: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10551: l_recog_line_1 NUMBER;
10552: l_recog_line_2 NUMBER;
10553:
10546: l_num_entries NUMBER;
10547: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
10548: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
10549: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
10550: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
10551: l_recog_line_1 NUMBER;
10552: l_recog_line_2 NUMBER;
10553:
10554: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
10552: l_recog_line_2 NUMBER;
10553:
10554: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
10555: l_bflow_applied_to_amt NUMBER; -- 5132302
10556: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
10557:
10558: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
10559:
10560: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
10626: l_acc_rev_flag := NULL; -- 4262811
10627: l_accrual_line_num := NULL; -- 4262811
10628: l_tmp_amt := NULL; -- 4262811
10629: --
10630: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
10631: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
10632: return;
10633: END IF;
10634:
10627: l_accrual_line_num := NULL; -- 4262811
10628: l_tmp_amt := NULL; -- 4262811
10629: --
10630: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
10631: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
10632: return;
10633: END IF;
10634:
10635: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
10631: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
10632: return;
10633: END IF;
10634:
10635: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
10636: l_balance_type_code <> 'B' THEN
10637: IF NVL(p_source_33,'
10638: ') = 'ACCRUAL'
10639: THEN
10703: --
10704: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
10705:
10706: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
10707: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
10708:
10709: -- 4955764
10710: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
10711: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
10815: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
10816:
10817: IF xla_accounting_cache_pkg.GetValueChar
10818: (p_source_code => 'LEDGER_CATEGORY_CODE'
10819: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
10820: AND l_bflow_method_code = 'PRIOR_ENTRY'
10821: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
10822: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
10823: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
11069: p_lookup_type => 'XLA_OWNER_TYPE'
11070: ,p_lookup_code => l_component_type_code
11071: )
11072: ,p_token_4 => 'PRODUCT_NAME'
11073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11077: ,p_ae_header_id => NULL
11070: ,p_lookup_code => l_component_type_code
11071: )
11072: ,p_token_4 => 'PRODUCT_NAME'
11073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11077: ,p_ae_header_id => NULL
11078: );
11071: )
11072: ,p_token_4 => 'PRODUCT_NAME'
11073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11077: ,p_ae_header_id => NULL
11078: );
11079:
11072: ,p_token_4 => 'PRODUCT_NAME'
11073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
11074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
11075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
11076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
11077: ,p_ae_header_id => NULL
11078: );
11079:
11080: IF (C_LEVEL_ERROR>= g_log_level) THEN
11103: ----------------------------------------------------------------------------------
11104: -- 4219869 Business Flow
11105: -- Update journal entry status -- Need to generate this within IF
11106: ----------------------------------------------------------------------------------
11107: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
11108: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
11109: ,p_balance_type_code => l_balance_type_code
11110: );
11111:
11334:
11335: --
11336: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
11337: --
11338: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
11339: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
11340: ELSE
11341: ---------------------------------------------------------------------------------------------------
11342: -- 4262811a Switch Sign
11359:
11360: XLA_AE_LINES_PKG.ValidateCurrentLine;
11361: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
11362:
11363: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
11364: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
11365: ,p_balance_type_code => l_balance_type_code);
11366:
11367: END IF;
11536: l_tmp_amt NUMBER;
11537: l_acc_rev_natural_side_code VARCHAR2(1);
11538:
11539: l_num_entries NUMBER;
11540: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11541: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11542: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11543: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11544: l_recog_line_1 NUMBER;
11537: l_acc_rev_natural_side_code VARCHAR2(1);
11538:
11539: l_num_entries NUMBER;
11540: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11541: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11542: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11543: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11544: l_recog_line_1 NUMBER;
11545: l_recog_line_2 NUMBER;
11538:
11539: l_num_entries NUMBER;
11540: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11541: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11542: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11543: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11544: l_recog_line_1 NUMBER;
11545: l_recog_line_2 NUMBER;
11546:
11539: l_num_entries NUMBER;
11540: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
11541: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
11542: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
11543: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
11544: l_recog_line_1 NUMBER;
11545: l_recog_line_2 NUMBER;
11546:
11547: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
11545: l_recog_line_2 NUMBER;
11546:
11547: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
11548: l_bflow_applied_to_amt NUMBER; -- 5132302
11549: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
11550:
11551: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
11552:
11553: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
11619: l_acc_rev_flag := NULL; -- 4262811
11620: l_accrual_line_num := NULL; -- 4262811
11621: l_tmp_amt := NULL; -- 4262811
11622: --
11623: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
11624: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
11625: return;
11626: END IF;
11627:
11620: l_accrual_line_num := NULL; -- 4262811
11621: l_tmp_amt := NULL; -- 4262811
11622: --
11623: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
11624: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
11625: return;
11626: END IF;
11627:
11628: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
11624: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
11625: return;
11626: END IF;
11627:
11628: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
11629: l_balance_type_code <> 'B' THEN
11630: IF NVL(p_source_33,'
11631: ') = 'ACCRUAL'
11632: THEN
11696: --
11697: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
11698:
11699: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
11700: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
11701:
11702: -- 4955764
11703: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
11704: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
11812: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
11813:
11814: IF xla_accounting_cache_pkg.GetValueChar
11815: (p_source_code => 'LEDGER_CATEGORY_CODE'
11816: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
11817: AND l_bflow_method_code = 'PRIOR_ENTRY'
11818: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
11819: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
11820: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
12066: p_lookup_type => 'XLA_OWNER_TYPE'
12067: ,p_lookup_code => l_component_type_code
12068: )
12069: ,p_token_4 => 'PRODUCT_NAME'
12070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12074: ,p_ae_header_id => NULL
12067: ,p_lookup_code => l_component_type_code
12068: )
12069: ,p_token_4 => 'PRODUCT_NAME'
12070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12074: ,p_ae_header_id => NULL
12075: );
12068: )
12069: ,p_token_4 => 'PRODUCT_NAME'
12070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12074: ,p_ae_header_id => NULL
12075: );
12076:
12069: ,p_token_4 => 'PRODUCT_NAME'
12070: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
12071: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
12072: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
12073: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
12074: ,p_ae_header_id => NULL
12075: );
12076:
12077: IF (C_LEVEL_ERROR>= g_log_level) THEN
12100: ----------------------------------------------------------------------------------
12101: -- 4219869 Business Flow
12102: -- Update journal entry status -- Need to generate this within IF
12103: ----------------------------------------------------------------------------------
12104: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
12105: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
12106: ,p_balance_type_code => l_balance_type_code
12107: );
12108:
12331:
12332: --
12333: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
12334: --
12335: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
12336: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
12337: ELSE
12338: ---------------------------------------------------------------------------------------------------
12339: -- 4262811a Switch Sign
12356:
12357: XLA_AE_LINES_PKG.ValidateCurrentLine;
12358: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
12359:
12360: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
12361: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
12362: ,p_balance_type_code => l_balance_type_code);
12363:
12364: END IF;
12531: l_tmp_amt NUMBER;
12532: l_acc_rev_natural_side_code VARCHAR2(1);
12533:
12534: l_num_entries NUMBER;
12535: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12536: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12537: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12538: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12539: l_recog_line_1 NUMBER;
12532: l_acc_rev_natural_side_code VARCHAR2(1);
12533:
12534: l_num_entries NUMBER;
12535: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12536: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12537: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12538: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12539: l_recog_line_1 NUMBER;
12540: l_recog_line_2 NUMBER;
12533:
12534: l_num_entries NUMBER;
12535: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12536: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12537: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12538: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12539: l_recog_line_1 NUMBER;
12540: l_recog_line_2 NUMBER;
12541:
12534: l_num_entries NUMBER;
12535: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
12536: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
12537: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
12538: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
12539: l_recog_line_1 NUMBER;
12540: l_recog_line_2 NUMBER;
12541:
12542: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
12540: l_recog_line_2 NUMBER;
12541:
12542: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
12543: l_bflow_applied_to_amt NUMBER; -- 5132302
12544: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
12545:
12546: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
12547:
12548: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
12614: l_acc_rev_flag := NULL; -- 4262811
12615: l_accrual_line_num := NULL; -- 4262811
12616: l_tmp_amt := NULL; -- 4262811
12617: --
12618: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
12619: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
12620: return;
12621: END IF;
12622:
12615: l_accrual_line_num := NULL; -- 4262811
12616: l_tmp_amt := NULL; -- 4262811
12617: --
12618: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
12619: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
12620: return;
12621: END IF;
12622:
12623: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
12619: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
12620: return;
12621: END IF;
12622:
12623: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
12624: l_balance_type_code <> 'B' THEN
12625: IF NVL(p_source_33,'
12626: ') = 'ACCRUAL'
12627: THEN
12691: --
12692: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
12693:
12694: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
12695: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
12696:
12697: -- 4955764
12698: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
12699: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
12805: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
12806:
12807: IF xla_accounting_cache_pkg.GetValueChar
12808: (p_source_code => 'LEDGER_CATEGORY_CODE'
12809: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
12810: AND l_bflow_method_code = 'PRIOR_ENTRY'
12811: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
12812: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
12813: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
13059: p_lookup_type => 'XLA_OWNER_TYPE'
13060: ,p_lookup_code => l_component_type_code
13061: )
13062: ,p_token_4 => 'PRODUCT_NAME'
13063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13067: ,p_ae_header_id => NULL
13060: ,p_lookup_code => l_component_type_code
13061: )
13062: ,p_token_4 => 'PRODUCT_NAME'
13063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13067: ,p_ae_header_id => NULL
13068: );
13061: )
13062: ,p_token_4 => 'PRODUCT_NAME'
13063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13067: ,p_ae_header_id => NULL
13068: );
13069:
13062: ,p_token_4 => 'PRODUCT_NAME'
13063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
13064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
13065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
13066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
13067: ,p_ae_header_id => NULL
13068: );
13069:
13070: IF (C_LEVEL_ERROR>= g_log_level) THEN
13093: ----------------------------------------------------------------------------------
13094: -- 4219869 Business Flow
13095: -- Update journal entry status -- Need to generate this within IF
13096: ----------------------------------------------------------------------------------
13097: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
13098: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
13099: ,p_balance_type_code => l_balance_type_code
13100: );
13101:
13324:
13325: --
13326: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
13327: --
13328: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
13329: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
13330: ELSE
13331: ---------------------------------------------------------------------------------------------------
13332: -- 4262811a Switch Sign
13349:
13350: XLA_AE_LINES_PKG.ValidateCurrentLine;
13351: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
13352:
13353: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
13354: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
13355: ,p_balance_type_code => l_balance_type_code);
13356:
13357: END IF;
13527: l_tmp_amt NUMBER;
13528: l_acc_rev_natural_side_code VARCHAR2(1);
13529:
13530: l_num_entries NUMBER;
13531: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13532: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13533: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13534: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13535: l_recog_line_1 NUMBER;
13528: l_acc_rev_natural_side_code VARCHAR2(1);
13529:
13530: l_num_entries NUMBER;
13531: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13532: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13533: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13534: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13535: l_recog_line_1 NUMBER;
13536: l_recog_line_2 NUMBER;
13529:
13530: l_num_entries NUMBER;
13531: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13532: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13533: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13534: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13535: l_recog_line_1 NUMBER;
13536: l_recog_line_2 NUMBER;
13537:
13530: l_num_entries NUMBER;
13531: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
13532: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
13533: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
13534: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
13535: l_recog_line_1 NUMBER;
13536: l_recog_line_2 NUMBER;
13537:
13538: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
13536: l_recog_line_2 NUMBER;
13537:
13538: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
13539: l_bflow_applied_to_amt NUMBER; -- 5132302
13540: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
13541:
13542: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
13543:
13544: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
13610: l_acc_rev_flag := NULL; -- 4262811
13611: l_accrual_line_num := NULL; -- 4262811
13612: l_tmp_amt := NULL; -- 4262811
13613: --
13614: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
13615: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
13616: return;
13617: END IF;
13618:
13611: l_accrual_line_num := NULL; -- 4262811
13612: l_tmp_amt := NULL; -- 4262811
13613: --
13614: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
13615: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
13616: return;
13617: END IF;
13618:
13619: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
13615: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
13616: return;
13617: END IF;
13618:
13619: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
13620: l_balance_type_code <> 'B' THEN
13621: IF NVL(p_source_33,'
13622: ') = 'NONREC_TAX' AND
13623: NVL(p_source_95,'
13689: --
13690: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
13691:
13692: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
13693: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
13694:
13695: -- 4955764
13696: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
13697: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
13803: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
13804:
13805: IF xla_accounting_cache_pkg.GetValueChar
13806: (p_source_code => 'LEDGER_CATEGORY_CODE'
13807: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
13808: AND l_bflow_method_code = 'PRIOR_ENTRY'
13809: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
13810: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
13811: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
14057: p_lookup_type => 'XLA_OWNER_TYPE'
14058: ,p_lookup_code => l_component_type_code
14059: )
14060: ,p_token_4 => 'PRODUCT_NAME'
14061: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14062: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14063: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14064: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14065: ,p_ae_header_id => NULL
14058: ,p_lookup_code => l_component_type_code
14059: )
14060: ,p_token_4 => 'PRODUCT_NAME'
14061: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14062: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14063: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14064: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14065: ,p_ae_header_id => NULL
14066: );
14059: )
14060: ,p_token_4 => 'PRODUCT_NAME'
14061: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14062: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14063: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14064: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14065: ,p_ae_header_id => NULL
14066: );
14067:
14060: ,p_token_4 => 'PRODUCT_NAME'
14061: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
14062: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
14063: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
14064: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
14065: ,p_ae_header_id => NULL
14066: );
14067:
14068: IF (C_LEVEL_ERROR>= g_log_level) THEN
14091: ----------------------------------------------------------------------------------
14092: -- 4219869 Business Flow
14093: -- Update journal entry status -- Need to generate this within IF
14094: ----------------------------------------------------------------------------------
14095: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
14096: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
14097: ,p_balance_type_code => l_balance_type_code
14098: );
14099:
14322:
14323: --
14324: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
14325: --
14326: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
14327: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
14328: ELSE
14329: ---------------------------------------------------------------------------------------------------
14330: -- 4262811a Switch Sign
14347:
14348: XLA_AE_LINES_PKG.ValidateCurrentLine;
14349: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
14350:
14351: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
14352: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
14353: ,p_balance_type_code => l_balance_type_code);
14354:
14355: END IF;
14523: l_tmp_amt NUMBER;
14524: l_acc_rev_natural_side_code VARCHAR2(1);
14525:
14526: l_num_entries NUMBER;
14527: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14528: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14529: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14530: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14531: l_recog_line_1 NUMBER;
14524: l_acc_rev_natural_side_code VARCHAR2(1);
14525:
14526: l_num_entries NUMBER;
14527: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14528: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14529: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14530: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14531: l_recog_line_1 NUMBER;
14532: l_recog_line_2 NUMBER;
14525:
14526: l_num_entries NUMBER;
14527: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14528: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14529: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14530: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14531: l_recog_line_1 NUMBER;
14532: l_recog_line_2 NUMBER;
14533:
14526: l_num_entries NUMBER;
14527: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
14528: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
14529: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
14530: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
14531: l_recog_line_1 NUMBER;
14532: l_recog_line_2 NUMBER;
14533:
14534: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
14532: l_recog_line_2 NUMBER;
14533:
14534: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
14535: l_bflow_applied_to_amt NUMBER; -- 5132302
14536: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
14537:
14538: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
14539:
14540: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
14606: l_acc_rev_flag := NULL; -- 4262811
14607: l_accrual_line_num := NULL; -- 4262811
14608: l_tmp_amt := NULL; -- 4262811
14609: --
14610: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
14611: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
14612: return;
14613: END IF;
14614:
14607: l_accrual_line_num := NULL; -- 4262811
14608: l_tmp_amt := NULL; -- 4262811
14609: --
14610: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
14611: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
14612: return;
14613: END IF;
14614:
14615: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
14611: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
14612: return;
14613: END IF;
14614:
14615: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
14616: l_balance_type_code <> 'B' THEN
14617: IF NVL(p_source_33,'
14618: ') = 'NONREC_TAX' AND
14619: NVL(p_source_95,'
14685: --
14686: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
14687:
14688: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
14689: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
14690:
14691: -- 4955764
14692: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
14693: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
14797: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
14798:
14799: IF xla_accounting_cache_pkg.GetValueChar
14800: (p_source_code => 'LEDGER_CATEGORY_CODE'
14801: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
14802: AND l_bflow_method_code = 'PRIOR_ENTRY'
14803: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
14804: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
14805: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
15051: p_lookup_type => 'XLA_OWNER_TYPE'
15052: ,p_lookup_code => l_component_type_code
15053: )
15054: ,p_token_4 => 'PRODUCT_NAME'
15055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15059: ,p_ae_header_id => NULL
15052: ,p_lookup_code => l_component_type_code
15053: )
15054: ,p_token_4 => 'PRODUCT_NAME'
15055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15059: ,p_ae_header_id => NULL
15060: );
15053: )
15054: ,p_token_4 => 'PRODUCT_NAME'
15055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15059: ,p_ae_header_id => NULL
15060: );
15061:
15054: ,p_token_4 => 'PRODUCT_NAME'
15055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
15056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
15057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
15058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
15059: ,p_ae_header_id => NULL
15060: );
15061:
15062: IF (C_LEVEL_ERROR>= g_log_level) THEN
15085: ----------------------------------------------------------------------------------
15086: -- 4219869 Business Flow
15087: -- Update journal entry status -- Need to generate this within IF
15088: ----------------------------------------------------------------------------------
15089: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
15090: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
15091: ,p_balance_type_code => l_balance_type_code
15092: );
15093:
15316:
15317: --
15318: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
15319: --
15320: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
15321: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
15322: ELSE
15323: ---------------------------------------------------------------------------------------------------
15324: -- 4262811a Switch Sign
15341:
15342: XLA_AE_LINES_PKG.ValidateCurrentLine;
15343: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
15344:
15345: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
15346: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
15347: ,p_balance_type_code => l_balance_type_code);
15348:
15349: END IF;
15521: l_tmp_amt NUMBER;
15522: l_acc_rev_natural_side_code VARCHAR2(1);
15523:
15524: l_num_entries NUMBER;
15525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15529: l_recog_line_1 NUMBER;
15522: l_acc_rev_natural_side_code VARCHAR2(1);
15523:
15524: l_num_entries NUMBER;
15525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15529: l_recog_line_1 NUMBER;
15530: l_recog_line_2 NUMBER;
15523:
15524: l_num_entries NUMBER;
15525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15529: l_recog_line_1 NUMBER;
15530: l_recog_line_2 NUMBER;
15531:
15524: l_num_entries NUMBER;
15525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
15526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
15527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
15528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
15529: l_recog_line_1 NUMBER;
15530: l_recog_line_2 NUMBER;
15531:
15532: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
15530: l_recog_line_2 NUMBER;
15531:
15532: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
15533: l_bflow_applied_to_amt NUMBER; -- 5132302
15534: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
15535:
15536: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
15537:
15538: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
15604: l_acc_rev_flag := NULL; -- 4262811
15605: l_accrual_line_num := NULL; -- 4262811
15606: l_tmp_amt := NULL; -- 4262811
15607: --
15608: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
15609: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
15610: return;
15611: END IF;
15612:
15605: l_accrual_line_num := NULL; -- 4262811
15606: l_tmp_amt := NULL; -- 4262811
15607: --
15608: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
15609: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
15610: return;
15611: END IF;
15612:
15613: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
15609: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
15610: return;
15611: END IF;
15612:
15613: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
15614: l_balance_type_code <> 'B' THEN
15615: IF NVL(p_source_33,'
15616: ') = 'NONREC_TAX' AND
15617: NVL(p_source_95,'
15683: --
15684: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
15685:
15686: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
15687: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
15688:
15689: -- 4955764
15690: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
15691: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
15799: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
15800:
15801: IF xla_accounting_cache_pkg.GetValueChar
15802: (p_source_code => 'LEDGER_CATEGORY_CODE'
15803: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
15804: AND l_bflow_method_code = 'PRIOR_ENTRY'
15805: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
15806: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
15807: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
16053: p_lookup_type => 'XLA_OWNER_TYPE'
16054: ,p_lookup_code => l_component_type_code
16055: )
16056: ,p_token_4 => 'PRODUCT_NAME'
16057: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16058: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16059: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16060: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16061: ,p_ae_header_id => NULL
16054: ,p_lookup_code => l_component_type_code
16055: )
16056: ,p_token_4 => 'PRODUCT_NAME'
16057: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16058: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16059: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16060: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16061: ,p_ae_header_id => NULL
16062: );
16055: )
16056: ,p_token_4 => 'PRODUCT_NAME'
16057: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16058: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16059: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16060: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16061: ,p_ae_header_id => NULL
16062: );
16063:
16056: ,p_token_4 => 'PRODUCT_NAME'
16057: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
16058: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
16059: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
16060: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
16061: ,p_ae_header_id => NULL
16062: );
16063:
16064: IF (C_LEVEL_ERROR>= g_log_level) THEN
16087: ----------------------------------------------------------------------------------
16088: -- 4219869 Business Flow
16089: -- Update journal entry status -- Need to generate this within IF
16090: ----------------------------------------------------------------------------------
16091: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
16092: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
16093: ,p_balance_type_code => l_balance_type_code
16094: );
16095:
16318:
16319: --
16320: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
16321: --
16322: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
16323: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
16324: ELSE
16325: ---------------------------------------------------------------------------------------------------
16326: -- 4262811a Switch Sign
16343:
16344: XLA_AE_LINES_PKG.ValidateCurrentLine;
16345: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
16346:
16347: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
16348: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
16349: ,p_balance_type_code => l_balance_type_code);
16350:
16351: END IF;
16521: l_tmp_amt NUMBER;
16522: l_acc_rev_natural_side_code VARCHAR2(1);
16523:
16524: l_num_entries NUMBER;
16525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16529: l_recog_line_1 NUMBER;
16522: l_acc_rev_natural_side_code VARCHAR2(1);
16523:
16524: l_num_entries NUMBER;
16525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16529: l_recog_line_1 NUMBER;
16530: l_recog_line_2 NUMBER;
16523:
16524: l_num_entries NUMBER;
16525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16529: l_recog_line_1 NUMBER;
16530: l_recog_line_2 NUMBER;
16531:
16524: l_num_entries NUMBER;
16525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
16526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
16527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
16528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
16529: l_recog_line_1 NUMBER;
16530: l_recog_line_2 NUMBER;
16531:
16532: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
16530: l_recog_line_2 NUMBER;
16531:
16532: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
16533: l_bflow_applied_to_amt NUMBER; -- 5132302
16534: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
16535:
16536: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
16537:
16538: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
16604: l_acc_rev_flag := NULL; -- 4262811
16605: l_accrual_line_num := NULL; -- 4262811
16606: l_tmp_amt := NULL; -- 4262811
16607: --
16608: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
16609: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
16610: return;
16611: END IF;
16612:
16605: l_accrual_line_num := NULL; -- 4262811
16606: l_tmp_amt := NULL; -- 4262811
16607: --
16608: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
16609: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
16610: return;
16611: END IF;
16612:
16613: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
16609: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
16610: return;
16611: END IF;
16612:
16613: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
16614: l_balance_type_code <> 'B' THEN
16615: IF NVL(p_source_33,'
16616: ') = 'NONREC_TAX' AND
16617: NVL(p_source_95,'
16683: --
16684: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
16685:
16686: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
16687: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
16688:
16689: -- 4955764
16690: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
16691: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
16797: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
16798:
16799: IF xla_accounting_cache_pkg.GetValueChar
16800: (p_source_code => 'LEDGER_CATEGORY_CODE'
16801: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
16802: AND l_bflow_method_code = 'PRIOR_ENTRY'
16803: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
16804: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
16805: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
17051: p_lookup_type => 'XLA_OWNER_TYPE'
17052: ,p_lookup_code => l_component_type_code
17053: )
17054: ,p_token_4 => 'PRODUCT_NAME'
17055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17059: ,p_ae_header_id => NULL
17052: ,p_lookup_code => l_component_type_code
17053: )
17054: ,p_token_4 => 'PRODUCT_NAME'
17055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17059: ,p_ae_header_id => NULL
17060: );
17053: )
17054: ,p_token_4 => 'PRODUCT_NAME'
17055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17059: ,p_ae_header_id => NULL
17060: );
17061:
17054: ,p_token_4 => 'PRODUCT_NAME'
17055: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17056: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17057: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17058: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17059: ,p_ae_header_id => NULL
17060: );
17061:
17062: IF (C_LEVEL_ERROR>= g_log_level) THEN
17085: ----------------------------------------------------------------------------------
17086: -- 4219869 Business Flow
17087: -- Update journal entry status -- Need to generate this within IF
17088: ----------------------------------------------------------------------------------
17089: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
17090: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
17091: ,p_balance_type_code => l_balance_type_code
17092: );
17093:
17316:
17317: --
17318: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
17319: --
17320: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
17321: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
17322: ELSE
17323: ---------------------------------------------------------------------------------------------------
17324: -- 4262811a Switch Sign
17341:
17342: XLA_AE_LINES_PKG.ValidateCurrentLine;
17343: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
17344:
17345: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
17346: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
17347: ,p_balance_type_code => l_balance_type_code);
17348:
17349: END IF;
17486: l_tmp_amt NUMBER;
17487: l_acc_rev_natural_side_code VARCHAR2(1);
17488:
17489: l_num_entries NUMBER;
17490: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17491: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17492: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17493: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17494: l_recog_line_1 NUMBER;
17487: l_acc_rev_natural_side_code VARCHAR2(1);
17488:
17489: l_num_entries NUMBER;
17490: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17491: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17492: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17493: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17494: l_recog_line_1 NUMBER;
17495: l_recog_line_2 NUMBER;
17488:
17489: l_num_entries NUMBER;
17490: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17491: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17492: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17493: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17494: l_recog_line_1 NUMBER;
17495: l_recog_line_2 NUMBER;
17496:
17489: l_num_entries NUMBER;
17490: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
17491: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
17492: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
17493: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
17494: l_recog_line_1 NUMBER;
17495: l_recog_line_2 NUMBER;
17496:
17497: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
17495: l_recog_line_2 NUMBER;
17496:
17497: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
17498: l_bflow_applied_to_amt NUMBER; -- 5132302
17499: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
17500:
17501: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
17502:
17503: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
17570: l_accrual_line_num := NULL; -- 4262811
17571: l_tmp_amt := NULL; -- 4262811
17572: --
17573:
17574: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
17575: l_balance_type_code <> 'B' THEN
17576: IF NVL(p_source_96,'
17577: ') <> 'ISSUE_ISSUE' AND
17578: NVL(p_source_97,'
17644: --
17645: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
17646:
17647: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
17648: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
17649:
17650: -- 4955764
17651: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
17652: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
17720: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
17721:
17722: IF xla_accounting_cache_pkg.GetValueChar
17723: (p_source_code => 'LEDGER_CATEGORY_CODE'
17724: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
17725: AND l_bflow_method_code = 'PRIOR_ENTRY'
17726: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
17727: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
17728: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
17927: p_lookup_type => 'XLA_OWNER_TYPE'
17928: ,p_lookup_code => l_component_type_code
17929: )
17930: ,p_token_4 => 'PRODUCT_NAME'
17931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17935: ,p_ae_header_id => NULL
17928: ,p_lookup_code => l_component_type_code
17929: )
17930: ,p_token_4 => 'PRODUCT_NAME'
17931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17935: ,p_ae_header_id => NULL
17936: );
17929: )
17930: ,p_token_4 => 'PRODUCT_NAME'
17931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17935: ,p_ae_header_id => NULL
17936: );
17937:
17930: ,p_token_4 => 'PRODUCT_NAME'
17931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
17932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
17933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
17934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
17935: ,p_ae_header_id => NULL
17936: );
17937:
17938: IF (C_LEVEL_ERROR>= g_log_level) THEN
17961: ----------------------------------------------------------------------------------
17962: -- 4219869 Business Flow
17963: -- Update journal entry status -- Need to generate this within IF
17964: ----------------------------------------------------------------------------------
17965: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
17966: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
17967: ,p_balance_type_code => l_balance_type_code
17968: );
17969:
18137:
18138: --
18139: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
18140: --
18141: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
18142: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
18143: ELSE
18144: ---------------------------------------------------------------------------------------------------
18145: -- 4262811a Switch Sign
18162:
18163: XLA_AE_LINES_PKG.ValidateCurrentLine;
18164: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
18165:
18166: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18167: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
18168: ,p_balance_type_code => l_balance_type_code);
18169:
18170: END IF;
18307: l_tmp_amt NUMBER;
18308: l_acc_rev_natural_side_code VARCHAR2(1);
18309:
18310: l_num_entries NUMBER;
18311: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18312: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18313: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18314: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18315: l_recog_line_1 NUMBER;
18308: l_acc_rev_natural_side_code VARCHAR2(1);
18309:
18310: l_num_entries NUMBER;
18311: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18312: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18313: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18314: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18315: l_recog_line_1 NUMBER;
18316: l_recog_line_2 NUMBER;
18309:
18310: l_num_entries NUMBER;
18311: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18312: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18313: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18314: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18315: l_recog_line_1 NUMBER;
18316: l_recog_line_2 NUMBER;
18317:
18310: l_num_entries NUMBER;
18311: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
18312: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
18313: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
18314: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
18315: l_recog_line_1 NUMBER;
18316: l_recog_line_2 NUMBER;
18317:
18318: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
18316: l_recog_line_2 NUMBER;
18317:
18318: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
18319: l_bflow_applied_to_amt NUMBER; -- 5132302
18320: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
18321:
18322: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
18323:
18324: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
18391: l_accrual_line_num := NULL; -- 4262811
18392: l_tmp_amt := NULL; -- 4262811
18393: --
18394:
18395: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
18396: l_balance_type_code <> 'B' THEN
18397: IF NVL(p_source_96,'
18398: ') <> 'ISSUE_ISSUE' AND
18399: NVL(p_source_97,'
18465: --
18466: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
18467:
18468: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
18469: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
18470:
18471: -- 4955764
18472: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
18473: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
18541: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
18542:
18543: IF xla_accounting_cache_pkg.GetValueChar
18544: (p_source_code => 'LEDGER_CATEGORY_CODE'
18545: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
18546: AND l_bflow_method_code = 'PRIOR_ENTRY'
18547: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
18548: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
18549: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
18748: p_lookup_type => 'XLA_OWNER_TYPE'
18749: ,p_lookup_code => l_component_type_code
18750: )
18751: ,p_token_4 => 'PRODUCT_NAME'
18752: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18753: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18754: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18755: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18756: ,p_ae_header_id => NULL
18749: ,p_lookup_code => l_component_type_code
18750: )
18751: ,p_token_4 => 'PRODUCT_NAME'
18752: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18753: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18754: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18755: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18756: ,p_ae_header_id => NULL
18757: );
18750: )
18751: ,p_token_4 => 'PRODUCT_NAME'
18752: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18753: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18754: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18755: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18756: ,p_ae_header_id => NULL
18757: );
18758:
18751: ,p_token_4 => 'PRODUCT_NAME'
18752: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
18753: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
18754: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
18755: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
18756: ,p_ae_header_id => NULL
18757: );
18758:
18759: IF (C_LEVEL_ERROR>= g_log_level) THEN
18782: ----------------------------------------------------------------------------------
18783: -- 4219869 Business Flow
18784: -- Update journal entry status -- Need to generate this within IF
18785: ----------------------------------------------------------------------------------
18786: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18787: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
18788: ,p_balance_type_code => l_balance_type_code
18789: );
18790:
18958:
18959: --
18960: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
18961: --
18962: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
18963: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
18964: ELSE
18965: ---------------------------------------------------------------------------------------------------
18966: -- 4262811a Switch Sign
18983:
18984: XLA_AE_LINES_PKG.ValidateCurrentLine;
18985: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
18986:
18987: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
18988: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
18989: ,p_balance_type_code => l_balance_type_code);
18990:
18991: END IF;
19129: l_tmp_amt NUMBER;
19130: l_acc_rev_natural_side_code VARCHAR2(1);
19131:
19132: l_num_entries NUMBER;
19133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19137: l_recog_line_1 NUMBER;
19130: l_acc_rev_natural_side_code VARCHAR2(1);
19131:
19132: l_num_entries NUMBER;
19133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19137: l_recog_line_1 NUMBER;
19138: l_recog_line_2 NUMBER;
19131:
19132: l_num_entries NUMBER;
19133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19137: l_recog_line_1 NUMBER;
19138: l_recog_line_2 NUMBER;
19139:
19132: l_num_entries NUMBER;
19133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19137: l_recog_line_1 NUMBER;
19138: l_recog_line_2 NUMBER;
19139:
19140: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19138: l_recog_line_2 NUMBER;
19139:
19140: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19141: l_bflow_applied_to_amt NUMBER; -- 5132302
19142: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
19143:
19144: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
19145:
19146: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
19213: l_accrual_line_num := NULL; -- 4262811
19214: l_tmp_amt := NULL; -- 4262811
19215: --
19216:
19217: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
19218: l_balance_type_code <> 'B' THEN
19219: IF NVL(p_source_96,'
19220: ') <> 'ISSUE_ISSUE' AND
19221: (NVL(p_source_113,'
19295: --
19296: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
19297:
19298: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
19299: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
19300:
19301: -- 4955764
19302: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
19303: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
19371: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
19372:
19373: IF xla_accounting_cache_pkg.GetValueChar
19374: (p_source_code => 'LEDGER_CATEGORY_CODE'
19375: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
19376: AND l_bflow_method_code = 'PRIOR_ENTRY'
19377: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
19378: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
19379: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
19559: p_lookup_type => 'XLA_OWNER_TYPE'
19560: ,p_lookup_code => l_component_type_code
19561: )
19562: ,p_token_4 => 'PRODUCT_NAME'
19563: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19564: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19565: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19566: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19567: ,p_ae_header_id => NULL
19560: ,p_lookup_code => l_component_type_code
19561: )
19562: ,p_token_4 => 'PRODUCT_NAME'
19563: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19564: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19565: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19566: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19567: ,p_ae_header_id => NULL
19568: );
19561: )
19562: ,p_token_4 => 'PRODUCT_NAME'
19563: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19564: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19565: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19566: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19567: ,p_ae_header_id => NULL
19568: );
19569:
19562: ,p_token_4 => 'PRODUCT_NAME'
19563: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
19564: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
19565: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
19566: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
19567: ,p_ae_header_id => NULL
19568: );
19569:
19570: IF (C_LEVEL_ERROR>= g_log_level) THEN
19593: ----------------------------------------------------------------------------------
19594: -- 4219869 Business Flow
19595: -- Update journal entry status -- Need to generate this within IF
19596: ----------------------------------------------------------------------------------
19597: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
19598: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
19599: ,p_balance_type_code => l_balance_type_code
19600: );
19601:
19747:
19748: --
19749: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
19750: --
19751: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
19752: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
19753: ELSE
19754: ---------------------------------------------------------------------------------------------------
19755: -- 4262811a Switch Sign
19772:
19773: XLA_AE_LINES_PKG.ValidateCurrentLine;
19774: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
19775:
19776: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
19777: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
19778: ,p_balance_type_code => l_balance_type_code);
19779:
19780: END IF;
19918: l_tmp_amt NUMBER;
19919: l_acc_rev_natural_side_code VARCHAR2(1);
19920:
19921: l_num_entries NUMBER;
19922: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19923: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19924: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19925: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19926: l_recog_line_1 NUMBER;
19919: l_acc_rev_natural_side_code VARCHAR2(1);
19920:
19921: l_num_entries NUMBER;
19922: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19923: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19924: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19925: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19926: l_recog_line_1 NUMBER;
19927: l_recog_line_2 NUMBER;
19920:
19921: l_num_entries NUMBER;
19922: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19923: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19924: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19925: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19926: l_recog_line_1 NUMBER;
19927: l_recog_line_2 NUMBER;
19928:
19921: l_num_entries NUMBER;
19922: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
19923: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
19924: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
19925: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
19926: l_recog_line_1 NUMBER;
19927: l_recog_line_2 NUMBER;
19928:
19929: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19927: l_recog_line_2 NUMBER;
19928:
19929: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
19930: l_bflow_applied_to_amt NUMBER; -- 5132302
19931: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
19932:
19933: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
19934:
19935: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
20002: l_accrual_line_num := NULL; -- 4262811
20003: l_tmp_amt := NULL; -- 4262811
20004: --
20005:
20006: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
20007: l_balance_type_code <> 'B' THEN
20008: IF NVL(p_source_96,'
20009: ') <> 'ISSUE_ISSUE' AND
20010: (NVL(p_source_113,'
20084: --
20085: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
20086:
20087: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
20088: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
20089:
20090: -- 4955764
20091: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
20092: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
20160: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
20161:
20162: IF xla_accounting_cache_pkg.GetValueChar
20163: (p_source_code => 'LEDGER_CATEGORY_CODE'
20164: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
20165: AND l_bflow_method_code = 'PRIOR_ENTRY'
20166: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
20167: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
20168: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
20305: p_lookup_type => 'XLA_OWNER_TYPE'
20306: ,p_lookup_code => l_component_type_code
20307: )
20308: ,p_token_4 => 'PRODUCT_NAME'
20309: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20310: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20311: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20312: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20313: ,p_ae_header_id => NULL
20306: ,p_lookup_code => l_component_type_code
20307: )
20308: ,p_token_4 => 'PRODUCT_NAME'
20309: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20310: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20311: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20312: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20313: ,p_ae_header_id => NULL
20314: );
20307: )
20308: ,p_token_4 => 'PRODUCT_NAME'
20309: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20310: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20311: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20312: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20313: ,p_ae_header_id => NULL
20314: );
20315:
20308: ,p_token_4 => 'PRODUCT_NAME'
20309: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20310: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20311: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20312: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20313: ,p_ae_header_id => NULL
20314: );
20315:
20316: IF (C_LEVEL_ERROR>= g_log_level) THEN
20339: ----------------------------------------------------------------------------------
20340: -- 4219869 Business Flow
20341: -- Update journal entry status -- Need to generate this within IF
20342: ----------------------------------------------------------------------------------
20343: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
20344: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
20345: ,p_balance_type_code => l_balance_type_code
20346: );
20347:
20450:
20451: --
20452: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
20453: --
20454: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
20455: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
20456: ELSE
20457: ---------------------------------------------------------------------------------------------------
20458: -- 4262811a Switch Sign
20475:
20476: XLA_AE_LINES_PKG.ValidateCurrentLine;
20477: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
20478:
20479: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
20480: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
20481: ,p_balance_type_code => l_balance_type_code);
20482:
20483: END IF;
20621: l_tmp_amt NUMBER;
20622: l_acc_rev_natural_side_code VARCHAR2(1);
20623:
20624: l_num_entries NUMBER;
20625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20629: l_recog_line_1 NUMBER;
20622: l_acc_rev_natural_side_code VARCHAR2(1);
20623:
20624: l_num_entries NUMBER;
20625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20629: l_recog_line_1 NUMBER;
20630: l_recog_line_2 NUMBER;
20623:
20624: l_num_entries NUMBER;
20625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20629: l_recog_line_1 NUMBER;
20630: l_recog_line_2 NUMBER;
20631:
20624: l_num_entries NUMBER;
20625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
20626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
20627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
20628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
20629: l_recog_line_1 NUMBER;
20630: l_recog_line_2 NUMBER;
20631:
20632: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
20630: l_recog_line_2 NUMBER;
20631:
20632: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
20633: l_bflow_applied_to_amt NUMBER; -- 5132302
20634: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
20635:
20636: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
20637:
20638: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
20705: l_accrual_line_num := NULL; -- 4262811
20706: l_tmp_amt := NULL; -- 4262811
20707: --
20708:
20709: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
20710: l_balance_type_code <> 'B' THEN
20711: IF NVL(p_source_96,'
20712: ') <> 'ISSUE_ISSUE' AND
20713: (NVL(p_source_47,'
20789: --
20790: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
20791:
20792: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
20793: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
20794:
20795: -- 4955764
20796: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
20797: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
20865: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
20866:
20867: IF xla_accounting_cache_pkg.GetValueChar
20868: (p_source_code => 'LEDGER_CATEGORY_CODE'
20869: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
20870: AND l_bflow_method_code = 'PRIOR_ENTRY'
20871: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
20872: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
20873: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
20983: p_lookup_type => 'XLA_OWNER_TYPE'
20984: ,p_lookup_code => l_component_type_code
20985: )
20986: ,p_token_4 => 'PRODUCT_NAME'
20987: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20988: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20989: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20990: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20991: ,p_ae_header_id => NULL
20984: ,p_lookup_code => l_component_type_code
20985: )
20986: ,p_token_4 => 'PRODUCT_NAME'
20987: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20988: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20989: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20990: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20991: ,p_ae_header_id => NULL
20992: );
20985: )
20986: ,p_token_4 => 'PRODUCT_NAME'
20987: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20988: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20989: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20990: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20991: ,p_ae_header_id => NULL
20992: );
20993:
20986: ,p_token_4 => 'PRODUCT_NAME'
20987: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
20988: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
20989: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
20990: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
20991: ,p_ae_header_id => NULL
20992: );
20993:
20994: IF (C_LEVEL_ERROR>= g_log_level) THEN
21017: ----------------------------------------------------------------------------------
21018: -- 4219869 Business Flow
21019: -- Update journal entry status -- Need to generate this within IF
21020: ----------------------------------------------------------------------------------
21021: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21022: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
21023: ,p_balance_type_code => l_balance_type_code
21024: );
21025:
21104:
21105: --
21106: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
21107: --
21108: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
21109: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
21110: ELSE
21111: ---------------------------------------------------------------------------------------------------
21112: -- 4262811a Switch Sign
21129:
21130: XLA_AE_LINES_PKG.ValidateCurrentLine;
21131: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
21132:
21133: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21134: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
21135: ,p_balance_type_code => l_balance_type_code);
21136:
21137: END IF;
21257: l_tmp_amt NUMBER;
21258: l_acc_rev_natural_side_code VARCHAR2(1);
21259:
21260: l_num_entries NUMBER;
21261: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21262: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21263: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21264: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21265: l_recog_line_1 NUMBER;
21258: l_acc_rev_natural_side_code VARCHAR2(1);
21259:
21260: l_num_entries NUMBER;
21261: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21262: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21263: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21264: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21265: l_recog_line_1 NUMBER;
21266: l_recog_line_2 NUMBER;
21259:
21260: l_num_entries NUMBER;
21261: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21262: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21263: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21264: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21265: l_recog_line_1 NUMBER;
21266: l_recog_line_2 NUMBER;
21267:
21260: l_num_entries NUMBER;
21261: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21262: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21263: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21264: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21265: l_recog_line_1 NUMBER;
21266: l_recog_line_2 NUMBER;
21267:
21268: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21266: l_recog_line_2 NUMBER;
21267:
21268: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21269: l_bflow_applied_to_amt NUMBER; -- 5132302
21270: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
21271:
21272: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
21273:
21274: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
21341: l_accrual_line_num := NULL; -- 4262811
21342: l_tmp_amt := NULL; -- 4262811
21343: --
21344:
21345: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
21346: l_balance_type_code <> 'B' THEN
21347: IF (NVL(p_source_96,'
21348: ') = 'ALWAYS_ALWAYS' OR
21349: NVL(p_source_96,'
21418: --
21419: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
21420:
21421: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
21422: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
21423:
21424: -- 4955764
21425: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
21426: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
21484: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
21485:
21486: IF xla_accounting_cache_pkg.GetValueChar
21487: (p_source_code => 'LEDGER_CATEGORY_CODE'
21488: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
21489: AND l_bflow_method_code = 'PRIOR_ENTRY'
21490: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
21491: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
21492: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
21561: p_lookup_type => 'XLA_OWNER_TYPE'
21562: ,p_lookup_code => l_component_type_code
21563: )
21564: ,p_token_4 => 'PRODUCT_NAME'
21565: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21566: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21567: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21568: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21569: ,p_ae_header_id => NULL
21562: ,p_lookup_code => l_component_type_code
21563: )
21564: ,p_token_4 => 'PRODUCT_NAME'
21565: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21566: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21567: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21568: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21569: ,p_ae_header_id => NULL
21570: );
21563: )
21564: ,p_token_4 => 'PRODUCT_NAME'
21565: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21566: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21567: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21568: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21569: ,p_ae_header_id => NULL
21570: );
21571:
21564: ,p_token_4 => 'PRODUCT_NAME'
21565: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
21566: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
21567: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
21568: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
21569: ,p_ae_header_id => NULL
21570: );
21571:
21572: IF (C_LEVEL_ERROR>= g_log_level) THEN
21595: ----------------------------------------------------------------------------------
21596: -- 4219869 Business Flow
21597: -- Update journal entry status -- Need to generate this within IF
21598: ----------------------------------------------------------------------------------
21599: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21600: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
21601: ,p_balance_type_code => l_balance_type_code
21602: );
21603:
21656:
21657: --
21658: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
21659: --
21660: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
21661: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
21662: ELSE
21663: ---------------------------------------------------------------------------------------------------
21664: -- 4262811a Switch Sign
21681:
21682: XLA_AE_LINES_PKG.ValidateCurrentLine;
21683: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
21684:
21685: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
21686: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
21687: ,p_balance_type_code => l_balance_type_code);
21688:
21689: END IF;
21809: l_tmp_amt NUMBER;
21810: l_acc_rev_natural_side_code VARCHAR2(1);
21811:
21812: l_num_entries NUMBER;
21813: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21814: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21815: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21816: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21817: l_recog_line_1 NUMBER;
21810: l_acc_rev_natural_side_code VARCHAR2(1);
21811:
21812: l_num_entries NUMBER;
21813: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21814: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21815: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21816: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21817: l_recog_line_1 NUMBER;
21818: l_recog_line_2 NUMBER;
21811:
21812: l_num_entries NUMBER;
21813: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21814: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21815: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21816: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21817: l_recog_line_1 NUMBER;
21818: l_recog_line_2 NUMBER;
21819:
21812: l_num_entries NUMBER;
21813: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
21814: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
21815: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
21816: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
21817: l_recog_line_1 NUMBER;
21818: l_recog_line_2 NUMBER;
21819:
21820: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21818: l_recog_line_2 NUMBER;
21819:
21820: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
21821: l_bflow_applied_to_amt NUMBER; -- 5132302
21822: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
21823:
21824: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
21825:
21826: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
21893: l_accrual_line_num := NULL; -- 4262811
21894: l_tmp_amt := NULL; -- 4262811
21895: --
21896:
21897: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
21898: l_balance_type_code <> 'B' THEN
21899: IF NVL(p_source_96,'
21900: ') = 'ALWAYS_CLEAR' AND
21901: NVL(p_source_97,'
21968: --
21969: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
21970:
21971: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
21972: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
21973:
21974: -- 4955764
21975: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
21976: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
22034: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
22035:
22036: IF xla_accounting_cache_pkg.GetValueChar
22037: (p_source_code => 'LEDGER_CATEGORY_CODE'
22038: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
22039: AND l_bflow_method_code = 'PRIOR_ENTRY'
22040: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
22041: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
22042: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
22111: p_lookup_type => 'XLA_OWNER_TYPE'
22112: ,p_lookup_code => l_component_type_code
22113: )
22114: ,p_token_4 => 'PRODUCT_NAME'
22115: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22116: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22117: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22118: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22119: ,p_ae_header_id => NULL
22112: ,p_lookup_code => l_component_type_code
22113: )
22114: ,p_token_4 => 'PRODUCT_NAME'
22115: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22116: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22117: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22118: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22119: ,p_ae_header_id => NULL
22120: );
22113: )
22114: ,p_token_4 => 'PRODUCT_NAME'
22115: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22116: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22117: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22118: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22119: ,p_ae_header_id => NULL
22120: );
22121:
22114: ,p_token_4 => 'PRODUCT_NAME'
22115: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22116: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22117: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22118: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22119: ,p_ae_header_id => NULL
22120: );
22121:
22122: IF (C_LEVEL_ERROR>= g_log_level) THEN
22145: ----------------------------------------------------------------------------------
22146: -- 4219869 Business Flow
22147: -- Update journal entry status -- Need to generate this within IF
22148: ----------------------------------------------------------------------------------
22149: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
22150: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
22151: ,p_balance_type_code => l_balance_type_code
22152: );
22153:
22206:
22207: --
22208: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
22209: --
22210: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
22211: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
22212: ELSE
22213: ---------------------------------------------------------------------------------------------------
22214: -- 4262811a Switch Sign
22231:
22232: XLA_AE_LINES_PKG.ValidateCurrentLine;
22233: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
22234:
22235: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
22236: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
22237: ,p_balance_type_code => l_balance_type_code);
22238:
22239: END IF;
22375: l_tmp_amt NUMBER;
22376: l_acc_rev_natural_side_code VARCHAR2(1);
22377:
22378: l_num_entries NUMBER;
22379: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22380: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22381: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22382: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22383: l_recog_line_1 NUMBER;
22376: l_acc_rev_natural_side_code VARCHAR2(1);
22377:
22378: l_num_entries NUMBER;
22379: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22380: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22381: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22382: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22383: l_recog_line_1 NUMBER;
22384: l_recog_line_2 NUMBER;
22377:
22378: l_num_entries NUMBER;
22379: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22380: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22381: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22382: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22383: l_recog_line_1 NUMBER;
22384: l_recog_line_2 NUMBER;
22385:
22378: l_num_entries NUMBER;
22379: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
22380: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
22381: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
22382: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
22383: l_recog_line_1 NUMBER;
22384: l_recog_line_2 NUMBER;
22385:
22386: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
22384: l_recog_line_2 NUMBER;
22385:
22386: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
22387: l_bflow_applied_to_amt NUMBER; -- 5132302
22388: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
22389:
22390: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
22391:
22392: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
22459: l_accrual_line_num := NULL; -- 4262811
22460: l_tmp_amt := NULL; -- 4262811
22461: --
22462:
22463: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
22464: l_balance_type_code <> 'B' THEN
22465: IF NVL(p_source_96,'
22466: ') = 'ALWAYS_CLEAR' AND
22467: (NVL(p_source_113,'
22538: --
22539: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
22540:
22541: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
22542: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
22543:
22544: -- 4955764
22545: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
22546: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
22606: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
22607:
22608: IF xla_accounting_cache_pkg.GetValueChar
22609: (p_source_code => 'LEDGER_CATEGORY_CODE'
22610: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
22611: AND l_bflow_method_code = 'PRIOR_ENTRY'
22612: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
22613: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
22614: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
22794: p_lookup_type => 'XLA_OWNER_TYPE'
22795: ,p_lookup_code => l_component_type_code
22796: )
22797: ,p_token_4 => 'PRODUCT_NAME'
22798: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22799: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22800: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22801: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22802: ,p_ae_header_id => NULL
22795: ,p_lookup_code => l_component_type_code
22796: )
22797: ,p_token_4 => 'PRODUCT_NAME'
22798: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22799: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22800: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22801: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22802: ,p_ae_header_id => NULL
22803: );
22796: )
22797: ,p_token_4 => 'PRODUCT_NAME'
22798: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22799: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22800: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22801: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22802: ,p_ae_header_id => NULL
22803: );
22804:
22797: ,p_token_4 => 'PRODUCT_NAME'
22798: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
22799: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
22800: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
22801: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
22802: ,p_ae_header_id => NULL
22803: );
22804:
22805: IF (C_LEVEL_ERROR>= g_log_level) THEN
22828: ----------------------------------------------------------------------------------
22829: -- 4219869 Business Flow
22830: -- Update journal entry status -- Need to generate this within IF
22831: ----------------------------------------------------------------------------------
22832: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
22833: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
22834: ,p_balance_type_code => l_balance_type_code
22835: );
22836:
22982:
22983: --
22984: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
22985: --
22986: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
22987: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
22988: ELSE
22989: ---------------------------------------------------------------------------------------------------
22990: -- 4262811a Switch Sign
23007:
23008: XLA_AE_LINES_PKG.ValidateCurrentLine;
23009: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
23010:
23011: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23012: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
23013: ,p_balance_type_code => l_balance_type_code);
23014:
23015: END IF;
23151: l_tmp_amt NUMBER;
23152: l_acc_rev_natural_side_code VARCHAR2(1);
23153:
23154: l_num_entries NUMBER;
23155: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23156: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23157: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23158: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23159: l_recog_line_1 NUMBER;
23152: l_acc_rev_natural_side_code VARCHAR2(1);
23153:
23154: l_num_entries NUMBER;
23155: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23156: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23157: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23158: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23159: l_recog_line_1 NUMBER;
23160: l_recog_line_2 NUMBER;
23153:
23154: l_num_entries NUMBER;
23155: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23156: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23157: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23158: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23159: l_recog_line_1 NUMBER;
23160: l_recog_line_2 NUMBER;
23161:
23154: l_num_entries NUMBER;
23155: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23156: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23157: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23158: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23159: l_recog_line_1 NUMBER;
23160: l_recog_line_2 NUMBER;
23161:
23162: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
23160: l_recog_line_2 NUMBER;
23161:
23162: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
23163: l_bflow_applied_to_amt NUMBER; -- 5132302
23164: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
23165:
23166: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
23167:
23168: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
23235: l_accrual_line_num := NULL; -- 4262811
23236: l_tmp_amt := NULL; -- 4262811
23237: --
23238:
23239: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
23240: l_balance_type_code <> 'B' THEN
23241: IF NVL(p_source_96,'
23242: ') = 'ALWAYS_CLEAR' AND
23243: (NVL(p_source_113,'
23314: --
23315: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
23316:
23317: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
23318: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
23319:
23320: -- 4955764
23321: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
23322: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
23382: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
23383:
23384: IF xla_accounting_cache_pkg.GetValueChar
23385: (p_source_code => 'LEDGER_CATEGORY_CODE'
23386: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
23387: AND l_bflow_method_code = 'PRIOR_ENTRY'
23388: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
23389: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
23390: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
23527: p_lookup_type => 'XLA_OWNER_TYPE'
23528: ,p_lookup_code => l_component_type_code
23529: )
23530: ,p_token_4 => 'PRODUCT_NAME'
23531: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23532: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23533: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23534: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23535: ,p_ae_header_id => NULL
23528: ,p_lookup_code => l_component_type_code
23529: )
23530: ,p_token_4 => 'PRODUCT_NAME'
23531: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23532: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23533: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23534: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23535: ,p_ae_header_id => NULL
23536: );
23529: )
23530: ,p_token_4 => 'PRODUCT_NAME'
23531: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23532: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23533: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23534: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23535: ,p_ae_header_id => NULL
23536: );
23537:
23530: ,p_token_4 => 'PRODUCT_NAME'
23531: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
23532: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
23533: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
23534: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
23535: ,p_ae_header_id => NULL
23536: );
23537:
23538: IF (C_LEVEL_ERROR>= g_log_level) THEN
23561: ----------------------------------------------------------------------------------
23562: -- 4219869 Business Flow
23563: -- Update journal entry status -- Need to generate this within IF
23564: ----------------------------------------------------------------------------------
23565: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23566: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
23567: ,p_balance_type_code => l_balance_type_code
23568: );
23569:
23672:
23673: --
23674: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
23675: --
23676: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
23677: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
23678: ELSE
23679: ---------------------------------------------------------------------------------------------------
23680: -- 4262811a Switch Sign
23697:
23698: XLA_AE_LINES_PKG.ValidateCurrentLine;
23699: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
23700:
23701: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
23702: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
23703: ,p_balance_type_code => l_balance_type_code);
23704:
23705: END IF;
23825: l_tmp_amt NUMBER;
23826: l_acc_rev_natural_side_code VARCHAR2(1);
23827:
23828: l_num_entries NUMBER;
23829: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23830: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23831: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23832: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23833: l_recog_line_1 NUMBER;
23826: l_acc_rev_natural_side_code VARCHAR2(1);
23827:
23828: l_num_entries NUMBER;
23829: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23830: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23831: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23832: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23833: l_recog_line_1 NUMBER;
23834: l_recog_line_2 NUMBER;
23827:
23828: l_num_entries NUMBER;
23829: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23830: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23831: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23832: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23833: l_recog_line_1 NUMBER;
23834: l_recog_line_2 NUMBER;
23835:
23828: l_num_entries NUMBER;
23829: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
23830: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
23831: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
23832: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
23833: l_recog_line_1 NUMBER;
23834: l_recog_line_2 NUMBER;
23835:
23836: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
23834: l_recog_line_2 NUMBER;
23835:
23836: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
23837: l_bflow_applied_to_amt NUMBER; -- 5132302
23838: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
23839:
23840: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
23841:
23842: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
23909: l_accrual_line_num := NULL; -- 4262811
23910: l_tmp_amt := NULL; -- 4262811
23911: --
23912:
23913: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
23914: l_balance_type_code <> 'B' THEN
23915: IF (NVL(p_source_96,'
23916: ') = 'ALWAYS_ALWAYS' OR
23917: NVL(p_source_96,'
23988: --
23989: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
23990:
23991: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
23992: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
23993:
23994: -- 4955764
23995: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
23996: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
24054: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
24055:
24056: IF xla_accounting_cache_pkg.GetValueChar
24057: (p_source_code => 'LEDGER_CATEGORY_CODE'
24058: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
24059: AND l_bflow_method_code = 'PRIOR_ENTRY'
24060: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
24061: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
24062: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
24131: p_lookup_type => 'XLA_OWNER_TYPE'
24132: ,p_lookup_code => l_component_type_code
24133: )
24134: ,p_token_4 => 'PRODUCT_NAME'
24135: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24136: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24137: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24138: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24139: ,p_ae_header_id => NULL
24132: ,p_lookup_code => l_component_type_code
24133: )
24134: ,p_token_4 => 'PRODUCT_NAME'
24135: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24136: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24137: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24138: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24139: ,p_ae_header_id => NULL
24140: );
24133: )
24134: ,p_token_4 => 'PRODUCT_NAME'
24135: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24136: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24137: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24138: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24139: ,p_ae_header_id => NULL
24140: );
24141:
24134: ,p_token_4 => 'PRODUCT_NAME'
24135: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24136: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24137: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24138: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24139: ,p_ae_header_id => NULL
24140: );
24141:
24142: IF (C_LEVEL_ERROR>= g_log_level) THEN
24165: ----------------------------------------------------------------------------------
24166: -- 4219869 Business Flow
24167: -- Update journal entry status -- Need to generate this within IF
24168: ----------------------------------------------------------------------------------
24169: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
24170: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
24171: ,p_balance_type_code => l_balance_type_code
24172: );
24173:
24226:
24227: --
24228: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
24229: --
24230: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
24231: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
24232: ELSE
24233: ---------------------------------------------------------------------------------------------------
24234: -- 4262811a Switch Sign
24251:
24252: XLA_AE_LINES_PKG.ValidateCurrentLine;
24253: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
24254:
24255: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
24256: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
24257: ,p_balance_type_code => l_balance_type_code);
24258:
24259: END IF;
24408: l_tmp_amt NUMBER;
24409: l_acc_rev_natural_side_code VARCHAR2(1);
24410:
24411: l_num_entries NUMBER;
24412: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24413: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24414: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24415: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24416: l_recog_line_1 NUMBER;
24409: l_acc_rev_natural_side_code VARCHAR2(1);
24410:
24411: l_num_entries NUMBER;
24412: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24413: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24414: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24415: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24416: l_recog_line_1 NUMBER;
24417: l_recog_line_2 NUMBER;
24410:
24411: l_num_entries NUMBER;
24412: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24413: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24414: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24415: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24416: l_recog_line_1 NUMBER;
24417: l_recog_line_2 NUMBER;
24418:
24411: l_num_entries NUMBER;
24412: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
24413: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
24414: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
24415: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
24416: l_recog_line_1 NUMBER;
24417: l_recog_line_2 NUMBER;
24418:
24419: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
24417: l_recog_line_2 NUMBER;
24418:
24419: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
24420: l_bflow_applied_to_amt NUMBER; -- 5132302
24421: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
24422:
24423: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
24424:
24425: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
24492: l_accrual_line_num := NULL; -- 4262811
24493: l_tmp_amt := NULL; -- 4262811
24494: --
24495:
24496: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
24497: l_balance_type_code <> 'B' THEN
24498: IF NVL(p_source_96,'
24499: ') = 'ALWAYS_ALWAYS' AND
24500: (NVL(p_source_47,'
24577: --
24578: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
24579:
24580: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
24581: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
24582:
24583: -- 4955764
24584: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
24585: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
24653: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
24654:
24655: IF xla_accounting_cache_pkg.GetValueChar
24656: (p_source_code => 'LEDGER_CATEGORY_CODE'
24657: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
24658: AND l_bflow_method_code = 'PRIOR_ENTRY'
24659: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
24660: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
24661: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
24771: p_lookup_type => 'XLA_OWNER_TYPE'
24772: ,p_lookup_code => l_component_type_code
24773: )
24774: ,p_token_4 => 'PRODUCT_NAME'
24775: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24776: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24777: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24778: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24779: ,p_ae_header_id => NULL
24772: ,p_lookup_code => l_component_type_code
24773: )
24774: ,p_token_4 => 'PRODUCT_NAME'
24775: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24776: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24777: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24778: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24779: ,p_ae_header_id => NULL
24780: );
24773: )
24774: ,p_token_4 => 'PRODUCT_NAME'
24775: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24776: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24777: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24778: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24779: ,p_ae_header_id => NULL
24780: );
24781:
24774: ,p_token_4 => 'PRODUCT_NAME'
24775: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
24776: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
24777: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
24778: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
24779: ,p_ae_header_id => NULL
24780: );
24781:
24782: IF (C_LEVEL_ERROR>= g_log_level) THEN
24805: ----------------------------------------------------------------------------------
24806: -- 4219869 Business Flow
24807: -- Update journal entry status -- Need to generate this within IF
24808: ----------------------------------------------------------------------------------
24809: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
24810: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
24811: ,p_balance_type_code => l_balance_type_code
24812: );
24813:
24892:
24893: --
24894: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
24895: --
24896: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
24897: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
24898: ELSE
24899: ---------------------------------------------------------------------------------------------------
24900: -- 4262811a Switch Sign
24917:
24918: XLA_AE_LINES_PKG.ValidateCurrentLine;
24919: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
24920:
24921: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
24922: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
24923: ,p_balance_type_code => l_balance_type_code);
24924:
24925: END IF;
25074: l_tmp_amt NUMBER;
25075: l_acc_rev_natural_side_code VARCHAR2(1);
25076:
25077: l_num_entries NUMBER;
25078: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25079: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25080: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25081: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25082: l_recog_line_1 NUMBER;
25075: l_acc_rev_natural_side_code VARCHAR2(1);
25076:
25077: l_num_entries NUMBER;
25078: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25079: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25080: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25081: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25082: l_recog_line_1 NUMBER;
25083: l_recog_line_2 NUMBER;
25076:
25077: l_num_entries NUMBER;
25078: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25079: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25080: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25081: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25082: l_recog_line_1 NUMBER;
25083: l_recog_line_2 NUMBER;
25084:
25077: l_num_entries NUMBER;
25078: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25079: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25080: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25081: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25082: l_recog_line_1 NUMBER;
25083: l_recog_line_2 NUMBER;
25084:
25085: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
25083: l_recog_line_2 NUMBER;
25084:
25085: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
25086: l_bflow_applied_to_amt NUMBER; -- 5132302
25087: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
25088:
25089: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
25090:
25091: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
25158: l_accrual_line_num := NULL; -- 4262811
25159: l_tmp_amt := NULL; -- 4262811
25160: --
25161:
25162: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
25163: l_balance_type_code <> 'B' THEN
25164: IF NVL(p_source_96,'
25165: ') = 'ALWAYS_ALWAYS' AND
25166: (NVL(p_source_113,'
25241: --
25242: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
25243:
25244: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
25245: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
25246:
25247: -- 4955764
25248: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
25249: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
25317: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
25318:
25319: IF xla_accounting_cache_pkg.GetValueChar
25320: (p_source_code => 'LEDGER_CATEGORY_CODE'
25321: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
25322: AND l_bflow_method_code = 'PRIOR_ENTRY'
25323: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
25324: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
25325: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
25505: p_lookup_type => 'XLA_OWNER_TYPE'
25506: ,p_lookup_code => l_component_type_code
25507: )
25508: ,p_token_4 => 'PRODUCT_NAME'
25509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25513: ,p_ae_header_id => NULL
25506: ,p_lookup_code => l_component_type_code
25507: )
25508: ,p_token_4 => 'PRODUCT_NAME'
25509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25513: ,p_ae_header_id => NULL
25514: );
25507: )
25508: ,p_token_4 => 'PRODUCT_NAME'
25509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25513: ,p_ae_header_id => NULL
25514: );
25515:
25508: ,p_token_4 => 'PRODUCT_NAME'
25509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
25510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
25511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
25512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
25513: ,p_ae_header_id => NULL
25514: );
25515:
25516: IF (C_LEVEL_ERROR>= g_log_level) THEN
25539: ----------------------------------------------------------------------------------
25540: -- 4219869 Business Flow
25541: -- Update journal entry status -- Need to generate this within IF
25542: ----------------------------------------------------------------------------------
25543: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
25544: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
25545: ,p_balance_type_code => l_balance_type_code
25546: );
25547:
25693:
25694: --
25695: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
25696: --
25697: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
25698: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
25699: ELSE
25700: ---------------------------------------------------------------------------------------------------
25701: -- 4262811a Switch Sign
25718:
25719: XLA_AE_LINES_PKG.ValidateCurrentLine;
25720: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
25721:
25722: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
25723: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
25724: ,p_balance_type_code => l_balance_type_code);
25725:
25726: END IF;
25875: l_tmp_amt NUMBER;
25876: l_acc_rev_natural_side_code VARCHAR2(1);
25877:
25878: l_num_entries NUMBER;
25879: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25880: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25881: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25882: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25883: l_recog_line_1 NUMBER;
25876: l_acc_rev_natural_side_code VARCHAR2(1);
25877:
25878: l_num_entries NUMBER;
25879: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25880: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25881: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25882: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25883: l_recog_line_1 NUMBER;
25884: l_recog_line_2 NUMBER;
25877:
25878: l_num_entries NUMBER;
25879: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25880: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25881: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25882: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25883: l_recog_line_1 NUMBER;
25884: l_recog_line_2 NUMBER;
25885:
25878: l_num_entries NUMBER;
25879: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
25880: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
25881: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
25882: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
25883: l_recog_line_1 NUMBER;
25884: l_recog_line_2 NUMBER;
25885:
25886: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
25884: l_recog_line_2 NUMBER;
25885:
25886: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
25887: l_bflow_applied_to_amt NUMBER; -- 5132302
25888: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
25889:
25890: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
25891:
25892: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
25959: l_accrual_line_num := NULL; -- 4262811
25960: l_tmp_amt := NULL; -- 4262811
25961: --
25962:
25963: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
25964: l_balance_type_code <> 'B' THEN
25965: IF NVL(p_source_96,'
25966: ') = 'ALWAYS_ALWAYS' AND
25967: (NVL(p_source_113,'
26042: --
26043: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
26044:
26045: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
26046: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
26047:
26048: -- 4955764
26049: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
26050: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
26118: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
26119:
26120: IF xla_accounting_cache_pkg.GetValueChar
26121: (p_source_code => 'LEDGER_CATEGORY_CODE'
26122: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
26123: AND l_bflow_method_code = 'PRIOR_ENTRY'
26124: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
26125: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
26126: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
26263: p_lookup_type => 'XLA_OWNER_TYPE'
26264: ,p_lookup_code => l_component_type_code
26265: )
26266: ,p_token_4 => 'PRODUCT_NAME'
26267: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26268: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26269: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26270: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26271: ,p_ae_header_id => NULL
26264: ,p_lookup_code => l_component_type_code
26265: )
26266: ,p_token_4 => 'PRODUCT_NAME'
26267: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26268: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26269: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26270: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26271: ,p_ae_header_id => NULL
26272: );
26265: )
26266: ,p_token_4 => 'PRODUCT_NAME'
26267: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26268: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26269: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26270: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26271: ,p_ae_header_id => NULL
26272: );
26273:
26266: ,p_token_4 => 'PRODUCT_NAME'
26267: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
26268: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
26269: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
26270: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
26271: ,p_ae_header_id => NULL
26272: );
26273:
26274: IF (C_LEVEL_ERROR>= g_log_level) THEN
26297: ----------------------------------------------------------------------------------
26298: -- 4219869 Business Flow
26299: -- Update journal entry status -- Need to generate this within IF
26300: ----------------------------------------------------------------------------------
26301: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
26302: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
26303: ,p_balance_type_code => l_balance_type_code
26304: );
26305:
26408:
26409: --
26410: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
26411: --
26412: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
26413: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
26414: ELSE
26415: ---------------------------------------------------------------------------------------------------
26416: -- 4262811a Switch Sign
26433:
26434: XLA_AE_LINES_PKG.ValidateCurrentLine;
26435: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
26436:
26437: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
26438: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
26439: ,p_balance_type_code => l_balance_type_code);
26440:
26441: END IF;
26590: l_tmp_amt NUMBER;
26591: l_acc_rev_natural_side_code VARCHAR2(1);
26592:
26593: l_num_entries NUMBER;
26594: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26595: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26596: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26597: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26598: l_recog_line_1 NUMBER;
26591: l_acc_rev_natural_side_code VARCHAR2(1);
26592:
26593: l_num_entries NUMBER;
26594: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26595: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26596: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26597: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26598: l_recog_line_1 NUMBER;
26599: l_recog_line_2 NUMBER;
26592:
26593: l_num_entries NUMBER;
26594: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26595: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26596: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26597: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26598: l_recog_line_1 NUMBER;
26599: l_recog_line_2 NUMBER;
26600:
26593: l_num_entries NUMBER;
26594: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
26595: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
26596: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
26597: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
26598: l_recog_line_1 NUMBER;
26599: l_recog_line_2 NUMBER;
26600:
26601: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
26599: l_recog_line_2 NUMBER;
26600:
26601: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
26602: l_bflow_applied_to_amt NUMBER; -- 5132302
26603: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
26604:
26605: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
26606:
26607: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
26674: l_accrual_line_num := NULL; -- 4262811
26675: l_tmp_amt := NULL; -- 4262811
26676: --
26677:
26678: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
26679: l_balance_type_code <> 'B' THEN
26680: IF NVL(p_source_96,'
26681: ') = 'ALWAYS_CLEAR' AND
26682: (NVL(p_source_113,'
26757: --
26758: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
26759:
26760: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
26761: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
26762:
26763: -- 4955764
26764: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
26765: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
26833: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
26834:
26835: IF xla_accounting_cache_pkg.GetValueChar
26836: (p_source_code => 'LEDGER_CATEGORY_CODE'
26837: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
26838: AND l_bflow_method_code = 'PRIOR_ENTRY'
26839: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
26840: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
26841: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
27021: p_lookup_type => 'XLA_OWNER_TYPE'
27022: ,p_lookup_code => l_component_type_code
27023: )
27024: ,p_token_4 => 'PRODUCT_NAME'
27025: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27026: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27027: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27028: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27029: ,p_ae_header_id => NULL
27022: ,p_lookup_code => l_component_type_code
27023: )
27024: ,p_token_4 => 'PRODUCT_NAME'
27025: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27026: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27027: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27028: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27029: ,p_ae_header_id => NULL
27030: );
27023: )
27024: ,p_token_4 => 'PRODUCT_NAME'
27025: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27026: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27027: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27028: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27029: ,p_ae_header_id => NULL
27030: );
27031:
27024: ,p_token_4 => 'PRODUCT_NAME'
27025: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27026: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27027: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27028: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27029: ,p_ae_header_id => NULL
27030: );
27031:
27032: IF (C_LEVEL_ERROR>= g_log_level) THEN
27055: ----------------------------------------------------------------------------------
27056: -- 4219869 Business Flow
27057: -- Update journal entry status -- Need to generate this within IF
27058: ----------------------------------------------------------------------------------
27059: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27060: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
27061: ,p_balance_type_code => l_balance_type_code
27062: );
27063:
27209:
27210: --
27211: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
27212: --
27213: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
27214: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
27215: ELSE
27216: ---------------------------------------------------------------------------------------------------
27217: -- 4262811a Switch Sign
27234:
27235: XLA_AE_LINES_PKG.ValidateCurrentLine;
27236: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
27237:
27238: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27239: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
27240: ,p_balance_type_code => l_balance_type_code);
27241:
27242: END IF;
27391: l_tmp_amt NUMBER;
27392: l_acc_rev_natural_side_code VARCHAR2(1);
27393:
27394: l_num_entries NUMBER;
27395: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27396: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27397: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27398: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27399: l_recog_line_1 NUMBER;
27392: l_acc_rev_natural_side_code VARCHAR2(1);
27393:
27394: l_num_entries NUMBER;
27395: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27396: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27397: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27398: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27399: l_recog_line_1 NUMBER;
27400: l_recog_line_2 NUMBER;
27393:
27394: l_num_entries NUMBER;
27395: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27396: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27397: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27398: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27399: l_recog_line_1 NUMBER;
27400: l_recog_line_2 NUMBER;
27401:
27394: l_num_entries NUMBER;
27395: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
27396: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
27397: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
27398: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
27399: l_recog_line_1 NUMBER;
27400: l_recog_line_2 NUMBER;
27401:
27402: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
27400: l_recog_line_2 NUMBER;
27401:
27402: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
27403: l_bflow_applied_to_amt NUMBER; -- 5132302
27404: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
27405:
27406: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
27407:
27408: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
27475: l_accrual_line_num := NULL; -- 4262811
27476: l_tmp_amt := NULL; -- 4262811
27477: --
27478:
27479: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
27480: l_balance_type_code <> 'B' THEN
27481: IF NVL(p_source_96,'
27482: ') = 'ALWAYS_CLEAR' AND
27483: (NVL(p_source_113,'
27558: --
27559: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
27560:
27561: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
27562: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
27563:
27564: -- 4955764
27565: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
27566: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
27634: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
27635:
27636: IF xla_accounting_cache_pkg.GetValueChar
27637: (p_source_code => 'LEDGER_CATEGORY_CODE'
27638: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
27639: AND l_bflow_method_code = 'PRIOR_ENTRY'
27640: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
27641: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
27642: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
27779: p_lookup_type => 'XLA_OWNER_TYPE'
27780: ,p_lookup_code => l_component_type_code
27781: )
27782: ,p_token_4 => 'PRODUCT_NAME'
27783: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27784: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27785: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27786: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27787: ,p_ae_header_id => NULL
27780: ,p_lookup_code => l_component_type_code
27781: )
27782: ,p_token_4 => 'PRODUCT_NAME'
27783: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27784: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27785: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27786: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27787: ,p_ae_header_id => NULL
27788: );
27781: )
27782: ,p_token_4 => 'PRODUCT_NAME'
27783: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27784: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27785: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27786: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27787: ,p_ae_header_id => NULL
27788: );
27789:
27782: ,p_token_4 => 'PRODUCT_NAME'
27783: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
27784: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
27785: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
27786: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
27787: ,p_ae_header_id => NULL
27788: );
27789:
27790: IF (C_LEVEL_ERROR>= g_log_level) THEN
27813: ----------------------------------------------------------------------------------
27814: -- 4219869 Business Flow
27815: -- Update journal entry status -- Need to generate this within IF
27816: ----------------------------------------------------------------------------------
27817: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27818: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
27819: ,p_balance_type_code => l_balance_type_code
27820: );
27821:
27924:
27925: --
27926: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
27927: --
27928: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
27929: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
27930: ELSE
27931: ---------------------------------------------------------------------------------------------------
27932: -- 4262811a Switch Sign
27949:
27950: XLA_AE_LINES_PKG.ValidateCurrentLine;
27951: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
27952:
27953: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
27954: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
27955: ,p_balance_type_code => l_balance_type_code);
27956:
27957: END IF;
28106: l_tmp_amt NUMBER;
28107: l_acc_rev_natural_side_code VARCHAR2(1);
28108:
28109: l_num_entries NUMBER;
28110: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28111: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28112: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28113: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28114: l_recog_line_1 NUMBER;
28107: l_acc_rev_natural_side_code VARCHAR2(1);
28108:
28109: l_num_entries NUMBER;
28110: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28111: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28112: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28113: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28114: l_recog_line_1 NUMBER;
28115: l_recog_line_2 NUMBER;
28108:
28109: l_num_entries NUMBER;
28110: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28111: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28112: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28113: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28114: l_recog_line_1 NUMBER;
28115: l_recog_line_2 NUMBER;
28116:
28109: l_num_entries NUMBER;
28110: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28111: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28112: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28113: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28114: l_recog_line_1 NUMBER;
28115: l_recog_line_2 NUMBER;
28116:
28117: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
28115: l_recog_line_2 NUMBER;
28116:
28117: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
28118: l_bflow_applied_to_amt NUMBER; -- 5132302
28119: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
28120:
28121: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
28122:
28123: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
28190: l_accrual_line_num := NULL; -- 4262811
28191: l_tmp_amt := NULL; -- 4262811
28192: --
28193:
28194: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
28195: l_balance_type_code <> 'B' THEN
28196: IF NVL(p_source_96,'
28197: ') = 'ALWAYS_CLEAR' AND
28198: (NVL(p_source_47,'
28275: --
28276: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
28277:
28278: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
28279: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
28280:
28281: -- 4955764
28282: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
28283: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
28351: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
28352:
28353: IF xla_accounting_cache_pkg.GetValueChar
28354: (p_source_code => 'LEDGER_CATEGORY_CODE'
28355: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
28356: AND l_bflow_method_code = 'PRIOR_ENTRY'
28357: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
28358: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
28359: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
28469: p_lookup_type => 'XLA_OWNER_TYPE'
28470: ,p_lookup_code => l_component_type_code
28471: )
28472: ,p_token_4 => 'PRODUCT_NAME'
28473: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28474: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28475: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28476: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28477: ,p_ae_header_id => NULL
28470: ,p_lookup_code => l_component_type_code
28471: )
28472: ,p_token_4 => 'PRODUCT_NAME'
28473: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28474: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28475: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28476: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28477: ,p_ae_header_id => NULL
28478: );
28471: )
28472: ,p_token_4 => 'PRODUCT_NAME'
28473: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28474: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28475: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28476: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28477: ,p_ae_header_id => NULL
28478: );
28479:
28472: ,p_token_4 => 'PRODUCT_NAME'
28473: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
28474: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
28475: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
28476: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
28477: ,p_ae_header_id => NULL
28478: );
28479:
28480: IF (C_LEVEL_ERROR>= g_log_level) THEN
28503: ----------------------------------------------------------------------------------
28504: -- 4219869 Business Flow
28505: -- Update journal entry status -- Need to generate this within IF
28506: ----------------------------------------------------------------------------------
28507: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
28508: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
28509: ,p_balance_type_code => l_balance_type_code
28510: );
28511:
28590:
28591: --
28592: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
28593: --
28594: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
28595: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
28596: ELSE
28597: ---------------------------------------------------------------------------------------------------
28598: -- 4262811a Switch Sign
28615:
28616: XLA_AE_LINES_PKG.ValidateCurrentLine;
28617: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
28618:
28619: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
28620: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
28621: ,p_balance_type_code => l_balance_type_code);
28622:
28623: END IF;
28759: l_tmp_amt NUMBER;
28760: l_acc_rev_natural_side_code VARCHAR2(1);
28761:
28762: l_num_entries NUMBER;
28763: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28764: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28765: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28766: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28767: l_recog_line_1 NUMBER;
28760: l_acc_rev_natural_side_code VARCHAR2(1);
28761:
28762: l_num_entries NUMBER;
28763: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28764: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28765: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28766: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28767: l_recog_line_1 NUMBER;
28768: l_recog_line_2 NUMBER;
28761:
28762: l_num_entries NUMBER;
28763: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28764: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28765: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28766: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28767: l_recog_line_1 NUMBER;
28768: l_recog_line_2 NUMBER;
28769:
28762: l_num_entries NUMBER;
28763: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
28764: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
28765: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
28766: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
28767: l_recog_line_1 NUMBER;
28768: l_recog_line_2 NUMBER;
28769:
28770: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
28768: l_recog_line_2 NUMBER;
28769:
28770: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
28771: l_bflow_applied_to_amt NUMBER; -- 5132302
28772: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
28773:
28774: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
28775:
28776: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
28843: l_accrual_line_num := NULL; -- 4262811
28844: l_tmp_amt := NULL; -- 4262811
28845: --
28846:
28847: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
28848: l_balance_type_code <> 'B' THEN
28849: IF (NVL(p_source_96,'
28850: ') = 'ALWAYS_ALWAYS' OR
28851: NVL(p_source_96,'
28926: --
28927: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
28928:
28929: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
28930: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
28931:
28932: -- 4955764
28933: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
28934: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
28994: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
28995:
28996: IF xla_accounting_cache_pkg.GetValueChar
28997: (p_source_code => 'LEDGER_CATEGORY_CODE'
28998: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
28999: AND l_bflow_method_code = 'PRIOR_ENTRY'
29000: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
29001: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
29002: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
29112: p_lookup_type => 'XLA_OWNER_TYPE'
29113: ,p_lookup_code => l_component_type_code
29114: )
29115: ,p_token_4 => 'PRODUCT_NAME'
29116: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29117: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29118: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29119: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29120: ,p_ae_header_id => NULL
29113: ,p_lookup_code => l_component_type_code
29114: )
29115: ,p_token_4 => 'PRODUCT_NAME'
29116: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29117: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29118: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29119: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29120: ,p_ae_header_id => NULL
29121: );
29114: )
29115: ,p_token_4 => 'PRODUCT_NAME'
29116: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29117: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29118: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29119: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29120: ,p_ae_header_id => NULL
29121: );
29122:
29115: ,p_token_4 => 'PRODUCT_NAME'
29116: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29117: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29118: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29119: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29120: ,p_ae_header_id => NULL
29121: );
29122:
29123: IF (C_LEVEL_ERROR>= g_log_level) THEN
29146: ----------------------------------------------------------------------------------
29147: -- 4219869 Business Flow
29148: -- Update journal entry status -- Need to generate this within IF
29149: ----------------------------------------------------------------------------------
29150: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
29151: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
29152: ,p_balance_type_code => l_balance_type_code
29153: );
29154:
29233:
29234: --
29235: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
29236: --
29237: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
29238: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
29239: ELSE
29240: ---------------------------------------------------------------------------------------------------
29241: -- 4262811a Switch Sign
29258:
29259: XLA_AE_LINES_PKG.ValidateCurrentLine;
29260: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
29261:
29262: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
29263: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
29264: ,p_balance_type_code => l_balance_type_code);
29265:
29266: END IF;
29402: l_tmp_amt NUMBER;
29403: l_acc_rev_natural_side_code VARCHAR2(1);
29404:
29405: l_num_entries NUMBER;
29406: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
29407: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
29408: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
29409: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
29410: l_recog_line_1 NUMBER;
29403: l_acc_rev_natural_side_code VARCHAR2(1);
29404:
29405: l_num_entries NUMBER;
29406: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
29407: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
29408: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
29409: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
29410: l_recog_line_1 NUMBER;
29411: l_recog_line_2 NUMBER;
29404:
29405: l_num_entries NUMBER;
29406: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
29407: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
29408: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
29409: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
29410: l_recog_line_1 NUMBER;
29411: l_recog_line_2 NUMBER;
29412:
29405: l_num_entries NUMBER;
29406: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
29407: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
29408: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
29409: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
29410: l_recog_line_1 NUMBER;
29411: l_recog_line_2 NUMBER;
29412:
29413: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
29411: l_recog_line_2 NUMBER;
29412:
29413: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
29414: l_bflow_applied_to_amt NUMBER; -- 5132302
29415: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
29416:
29417: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
29418:
29419: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
29486: l_accrual_line_num := NULL; -- 4262811
29487: l_tmp_amt := NULL; -- 4262811
29488: --
29489:
29490: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
29491: l_balance_type_code <> 'B' THEN
29492: IF (NVL(p_source_96,'
29493: ') = 'ALWAYS_ALWAYS' OR
29494: NVL(p_source_96,'
29567: --
29568: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
29569:
29570: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
29571: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
29572:
29573: -- 4955764
29574: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
29575: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
29635: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
29636:
29637: IF xla_accounting_cache_pkg.GetValueChar
29638: (p_source_code => 'LEDGER_CATEGORY_CODE'
29639: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
29640: AND l_bflow_method_code = 'PRIOR_ENTRY'
29641: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
29642: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
29643: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
29823: p_lookup_type => 'XLA_OWNER_TYPE'
29824: ,p_lookup_code => l_component_type_code
29825: )
29826: ,p_token_4 => 'PRODUCT_NAME'
29827: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29828: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29829: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29830: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29831: ,p_ae_header_id => NULL
29824: ,p_lookup_code => l_component_type_code
29825: )
29826: ,p_token_4 => 'PRODUCT_NAME'
29827: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29828: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29829: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29830: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29831: ,p_ae_header_id => NULL
29832: );
29825: )
29826: ,p_token_4 => 'PRODUCT_NAME'
29827: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29828: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29829: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29830: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29831: ,p_ae_header_id => NULL
29832: );
29833:
29826: ,p_token_4 => 'PRODUCT_NAME'
29827: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
29828: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
29829: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
29830: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
29831: ,p_ae_header_id => NULL
29832: );
29833:
29834: IF (C_LEVEL_ERROR>= g_log_level) THEN
29857: ----------------------------------------------------------------------------------
29858: -- 4219869 Business Flow
29859: -- Update journal entry status -- Need to generate this within IF
29860: ----------------------------------------------------------------------------------
29861: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
29862: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
29863: ,p_balance_type_code => l_balance_type_code
29864: );
29865:
30011:
30012: --
30013: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
30014: --
30015: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
30016: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
30017: ELSE
30018: ---------------------------------------------------------------------------------------------------
30019: -- 4262811a Switch Sign
30036:
30037: XLA_AE_LINES_PKG.ValidateCurrentLine;
30038: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
30039:
30040: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
30041: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
30042: ,p_balance_type_code => l_balance_type_code);
30043:
30044: END IF;
30180: l_tmp_amt NUMBER;
30181: l_acc_rev_natural_side_code VARCHAR2(1);
30182:
30183: l_num_entries NUMBER;
30184: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30185: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30186: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30187: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30188: l_recog_line_1 NUMBER;
30181: l_acc_rev_natural_side_code VARCHAR2(1);
30182:
30183: l_num_entries NUMBER;
30184: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30185: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30186: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30187: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30188: l_recog_line_1 NUMBER;
30189: l_recog_line_2 NUMBER;
30182:
30183: l_num_entries NUMBER;
30184: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30185: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30186: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30187: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30188: l_recog_line_1 NUMBER;
30189: l_recog_line_2 NUMBER;
30190:
30183: l_num_entries NUMBER;
30184: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30185: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30186: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30187: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30188: l_recog_line_1 NUMBER;
30189: l_recog_line_2 NUMBER;
30190:
30191: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
30189: l_recog_line_2 NUMBER;
30190:
30191: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
30192: l_bflow_applied_to_amt NUMBER; -- 5132302
30193: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
30194:
30195: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
30196:
30197: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
30264: l_accrual_line_num := NULL; -- 4262811
30265: l_tmp_amt := NULL; -- 4262811
30266: --
30267:
30268: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
30269: l_balance_type_code <> 'B' THEN
30270: IF (NVL(p_source_96,'
30271: ') = 'ALWAYS_ALWAYS' OR
30272: NVL(p_source_96,'
30347: --
30348: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
30349:
30350: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
30351: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
30352:
30353: -- 4955764
30354: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
30355: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
30415: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
30416:
30417: IF xla_accounting_cache_pkg.GetValueChar
30418: (p_source_code => 'LEDGER_CATEGORY_CODE'
30419: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
30420: AND l_bflow_method_code = 'PRIOR_ENTRY'
30421: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
30422: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
30423: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
30560: p_lookup_type => 'XLA_OWNER_TYPE'
30561: ,p_lookup_code => l_component_type_code
30562: )
30563: ,p_token_4 => 'PRODUCT_NAME'
30564: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
30565: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
30566: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
30567: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
30568: ,p_ae_header_id => NULL
30561: ,p_lookup_code => l_component_type_code
30562: )
30563: ,p_token_4 => 'PRODUCT_NAME'
30564: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
30565: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
30566: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
30567: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
30568: ,p_ae_header_id => NULL
30569: );
30562: )
30563: ,p_token_4 => 'PRODUCT_NAME'
30564: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
30565: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
30566: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
30567: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
30568: ,p_ae_header_id => NULL
30569: );
30570:
30563: ,p_token_4 => 'PRODUCT_NAME'
30564: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
30565: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
30566: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
30567: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
30568: ,p_ae_header_id => NULL
30569: );
30570:
30571: IF (C_LEVEL_ERROR>= g_log_level) THEN
30594: ----------------------------------------------------------------------------------
30595: -- 4219869 Business Flow
30596: -- Update journal entry status -- Need to generate this within IF
30597: ----------------------------------------------------------------------------------
30598: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
30599: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
30600: ,p_balance_type_code => l_balance_type_code
30601: );
30602:
30705:
30706: --
30707: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
30708: --
30709: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
30710: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
30711: ELSE
30712: ---------------------------------------------------------------------------------------------------
30713: -- 4262811a Switch Sign
30730:
30731: XLA_AE_LINES_PKG.ValidateCurrentLine;
30732: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
30733:
30734: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
30735: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
30736: ,p_balance_type_code => l_balance_type_code);
30737:
30738: END IF;
30874: l_tmp_amt NUMBER;
30875: l_acc_rev_natural_side_code VARCHAR2(1);
30876:
30877: l_num_entries NUMBER;
30878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30882: l_recog_line_1 NUMBER;
30875: l_acc_rev_natural_side_code VARCHAR2(1);
30876:
30877: l_num_entries NUMBER;
30878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30882: l_recog_line_1 NUMBER;
30883: l_recog_line_2 NUMBER;
30876:
30877: l_num_entries NUMBER;
30878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30882: l_recog_line_1 NUMBER;
30883: l_recog_line_2 NUMBER;
30884:
30877: l_num_entries NUMBER;
30878: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
30879: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
30880: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
30881: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
30882: l_recog_line_1 NUMBER;
30883: l_recog_line_2 NUMBER;
30884:
30885: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
30883: l_recog_line_2 NUMBER;
30884:
30885: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
30886: l_bflow_applied_to_amt NUMBER; -- 5132302
30887: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
30888:
30889: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
30890:
30891: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
30958: l_accrual_line_num := NULL; -- 4262811
30959: l_tmp_amt := NULL; -- 4262811
30960: --
30961:
30962: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
30963: l_balance_type_code <> 'B' THEN
30964: IF NVL(p_source_96,'
30965: ') = 'ALWAYS_CLEAR' AND
30966: (NVL(p_source_47,'
31039: --
31040: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
31041:
31042: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
31043: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
31044:
31045: -- 4955764
31046: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
31047: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
31107: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
31108:
31109: IF xla_accounting_cache_pkg.GetValueChar
31110: (p_source_code => 'LEDGER_CATEGORY_CODE'
31111: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
31112: AND l_bflow_method_code = 'PRIOR_ENTRY'
31113: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
31114: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
31115: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
31225: p_lookup_type => 'XLA_OWNER_TYPE'
31226: ,p_lookup_code => l_component_type_code
31227: )
31228: ,p_token_4 => 'PRODUCT_NAME'
31229: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31230: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31231: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31232: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31233: ,p_ae_header_id => NULL
31226: ,p_lookup_code => l_component_type_code
31227: )
31228: ,p_token_4 => 'PRODUCT_NAME'
31229: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31230: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31231: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31232: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31233: ,p_ae_header_id => NULL
31234: );
31227: )
31228: ,p_token_4 => 'PRODUCT_NAME'
31229: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31230: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31231: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31232: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31233: ,p_ae_header_id => NULL
31234: );
31235:
31228: ,p_token_4 => 'PRODUCT_NAME'
31229: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31230: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31231: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31232: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31233: ,p_ae_header_id => NULL
31234: );
31235:
31236: IF (C_LEVEL_ERROR>= g_log_level) THEN
31259: ----------------------------------------------------------------------------------
31260: -- 4219869 Business Flow
31261: -- Update journal entry status -- Need to generate this within IF
31262: ----------------------------------------------------------------------------------
31263: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
31264: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
31265: ,p_balance_type_code => l_balance_type_code
31266: );
31267:
31346:
31347: --
31348: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
31349: --
31350: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
31351: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
31352: ELSE
31353: ---------------------------------------------------------------------------------------------------
31354: -- 4262811a Switch Sign
31371:
31372: XLA_AE_LINES_PKG.ValidateCurrentLine;
31373: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
31374:
31375: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
31376: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
31377: ,p_balance_type_code => l_balance_type_code);
31378:
31379: END IF;
31524: l_tmp_amt NUMBER;
31525: l_acc_rev_natural_side_code VARCHAR2(1);
31526:
31527: l_num_entries NUMBER;
31528: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
31529: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
31530: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
31531: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
31532: l_recog_line_1 NUMBER;
31525: l_acc_rev_natural_side_code VARCHAR2(1);
31526:
31527: l_num_entries NUMBER;
31528: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
31529: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
31530: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
31531: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
31532: l_recog_line_1 NUMBER;
31533: l_recog_line_2 NUMBER;
31526:
31527: l_num_entries NUMBER;
31528: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
31529: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
31530: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
31531: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
31532: l_recog_line_1 NUMBER;
31533: l_recog_line_2 NUMBER;
31534:
31527: l_num_entries NUMBER;
31528: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
31529: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
31530: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
31531: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
31532: l_recog_line_1 NUMBER;
31533: l_recog_line_2 NUMBER;
31534:
31535: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
31533: l_recog_line_2 NUMBER;
31534:
31535: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
31536: l_bflow_applied_to_amt NUMBER; -- 5132302
31537: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
31538:
31539: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
31540:
31541: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
31608: l_accrual_line_num := NULL; -- 4262811
31609: l_tmp_amt := NULL; -- 4262811
31610: --
31611:
31612: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
31613: l_balance_type_code <> 'B' THEN
31614: IF NVL(p_source_96,'
31615: ') = 'ALWAYS_ALWAYS' AND
31616: (NVL(p_source_47,'
31691: --
31692: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
31693:
31694: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
31695: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
31696:
31697: -- 4955764
31698: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
31699: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
31765: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
31766:
31767: IF xla_accounting_cache_pkg.GetValueChar
31768: (p_source_code => 'LEDGER_CATEGORY_CODE'
31769: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
31770: AND l_bflow_method_code = 'PRIOR_ENTRY'
31771: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
31772: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
31773: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
31883: p_lookup_type => 'XLA_OWNER_TYPE'
31884: ,p_lookup_code => l_component_type_code
31885: )
31886: ,p_token_4 => 'PRODUCT_NAME'
31887: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31888: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31889: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31890: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31891: ,p_ae_header_id => NULL
31884: ,p_lookup_code => l_component_type_code
31885: )
31886: ,p_token_4 => 'PRODUCT_NAME'
31887: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31888: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31889: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31890: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31891: ,p_ae_header_id => NULL
31892: );
31885: )
31886: ,p_token_4 => 'PRODUCT_NAME'
31887: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31888: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31889: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31890: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31891: ,p_ae_header_id => NULL
31892: );
31893:
31886: ,p_token_4 => 'PRODUCT_NAME'
31887: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
31888: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
31889: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
31890: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
31891: ,p_ae_header_id => NULL
31892: );
31893:
31894: IF (C_LEVEL_ERROR>= g_log_level) THEN
31917: ----------------------------------------------------------------------------------
31918: -- 4219869 Business Flow
31919: -- Update journal entry status -- Need to generate this within IF
31920: ----------------------------------------------------------------------------------
31921: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
31922: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
31923: ,p_balance_type_code => l_balance_type_code
31924: );
31925:
32004:
32005: --
32006: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
32007: --
32008: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
32009: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
32010: ELSE
32011: ---------------------------------------------------------------------------------------------------
32012: -- 4262811a Switch Sign
32029:
32030: XLA_AE_LINES_PKG.ValidateCurrentLine;
32031: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
32032:
32033: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
32034: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
32035: ,p_balance_type_code => l_balance_type_code);
32036:
32037: END IF;
32182: l_tmp_amt NUMBER;
32183: l_acc_rev_natural_side_code VARCHAR2(1);
32184:
32185: l_num_entries NUMBER;
32186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32190: l_recog_line_1 NUMBER;
32183: l_acc_rev_natural_side_code VARCHAR2(1);
32184:
32185: l_num_entries NUMBER;
32186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32190: l_recog_line_1 NUMBER;
32191: l_recog_line_2 NUMBER;
32184:
32185: l_num_entries NUMBER;
32186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32190: l_recog_line_1 NUMBER;
32191: l_recog_line_2 NUMBER;
32192:
32185: l_num_entries NUMBER;
32186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32190: l_recog_line_1 NUMBER;
32191: l_recog_line_2 NUMBER;
32192:
32193: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
32191: l_recog_line_2 NUMBER;
32192:
32193: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
32194: l_bflow_applied_to_amt NUMBER; -- 5132302
32195: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
32196:
32197: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
32198:
32199: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
32266: l_accrual_line_num := NULL; -- 4262811
32267: l_tmp_amt := NULL; -- 4262811
32268: --
32269:
32270: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
32271: l_balance_type_code <> 'B' THEN
32272: IF NVL(p_source_96,'
32273: ') = 'ALWAYS_ALWAYS' AND
32274: (NVL(p_source_113,'
32347: --
32348: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
32349:
32350: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
32351: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
32352:
32353: -- 4955764
32354: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
32355: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
32421: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
32422:
32423: IF xla_accounting_cache_pkg.GetValueChar
32424: (p_source_code => 'LEDGER_CATEGORY_CODE'
32425: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
32426: AND l_bflow_method_code = 'PRIOR_ENTRY'
32427: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
32428: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
32429: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
32609: p_lookup_type => 'XLA_OWNER_TYPE'
32610: ,p_lookup_code => l_component_type_code
32611: )
32612: ,p_token_4 => 'PRODUCT_NAME'
32613: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
32614: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
32615: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
32616: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
32617: ,p_ae_header_id => NULL
32610: ,p_lookup_code => l_component_type_code
32611: )
32612: ,p_token_4 => 'PRODUCT_NAME'
32613: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
32614: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
32615: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
32616: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
32617: ,p_ae_header_id => NULL
32618: );
32611: )
32612: ,p_token_4 => 'PRODUCT_NAME'
32613: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
32614: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
32615: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
32616: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
32617: ,p_ae_header_id => NULL
32618: );
32619:
32612: ,p_token_4 => 'PRODUCT_NAME'
32613: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
32614: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
32615: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
32616: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
32617: ,p_ae_header_id => NULL
32618: );
32619:
32620: IF (C_LEVEL_ERROR>= g_log_level) THEN
32643: ----------------------------------------------------------------------------------
32644: -- 4219869 Business Flow
32645: -- Update journal entry status -- Need to generate this within IF
32646: ----------------------------------------------------------------------------------
32647: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
32648: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
32649: ,p_balance_type_code => l_balance_type_code
32650: );
32651:
32797:
32798: --
32799: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
32800: --
32801: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
32802: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
32803: ELSE
32804: ---------------------------------------------------------------------------------------------------
32805: -- 4262811a Switch Sign
32822:
32823: XLA_AE_LINES_PKG.ValidateCurrentLine;
32824: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
32825:
32826: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
32827: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
32828: ,p_balance_type_code => l_balance_type_code);
32829:
32830: END IF;
32975: l_tmp_amt NUMBER;
32976: l_acc_rev_natural_side_code VARCHAR2(1);
32977:
32978: l_num_entries NUMBER;
32979: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32980: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32981: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32982: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32983: l_recog_line_1 NUMBER;
32976: l_acc_rev_natural_side_code VARCHAR2(1);
32977:
32978: l_num_entries NUMBER;
32979: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32980: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32981: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32982: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32983: l_recog_line_1 NUMBER;
32984: l_recog_line_2 NUMBER;
32977:
32978: l_num_entries NUMBER;
32979: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32980: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32981: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32982: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32983: l_recog_line_1 NUMBER;
32984: l_recog_line_2 NUMBER;
32985:
32978: l_num_entries NUMBER;
32979: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
32980: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
32981: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
32982: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
32983: l_recog_line_1 NUMBER;
32984: l_recog_line_2 NUMBER;
32985:
32986: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
32984: l_recog_line_2 NUMBER;
32985:
32986: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
32987: l_bflow_applied_to_amt NUMBER; -- 5132302
32988: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
32989:
32990: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
32991:
32992: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
33059: l_accrual_line_num := NULL; -- 4262811
33060: l_tmp_amt := NULL; -- 4262811
33061: --
33062:
33063: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
33064: l_balance_type_code <> 'B' THEN
33065: IF NVL(p_source_96,'
33066: ') = 'ALWAYS_ALWAYS' AND
33067: (NVL(p_source_113,'
33140: --
33141: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
33142:
33143: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
33144: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
33145:
33146: -- 4955764
33147: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
33148: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
33214: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
33215:
33216: IF xla_accounting_cache_pkg.GetValueChar
33217: (p_source_code => 'LEDGER_CATEGORY_CODE'
33218: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
33219: AND l_bflow_method_code = 'PRIOR_ENTRY'
33220: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
33221: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
33222: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
33359: p_lookup_type => 'XLA_OWNER_TYPE'
33360: ,p_lookup_code => l_component_type_code
33361: )
33362: ,p_token_4 => 'PRODUCT_NAME'
33363: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
33364: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
33365: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
33366: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
33367: ,p_ae_header_id => NULL
33360: ,p_lookup_code => l_component_type_code
33361: )
33362: ,p_token_4 => 'PRODUCT_NAME'
33363: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
33364: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
33365: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
33366: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
33367: ,p_ae_header_id => NULL
33368: );
33361: )
33362: ,p_token_4 => 'PRODUCT_NAME'
33363: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
33364: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
33365: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
33366: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
33367: ,p_ae_header_id => NULL
33368: );
33369:
33362: ,p_token_4 => 'PRODUCT_NAME'
33363: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
33364: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
33365: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
33366: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
33367: ,p_ae_header_id => NULL
33368: );
33369:
33370: IF (C_LEVEL_ERROR>= g_log_level) THEN
33393: ----------------------------------------------------------------------------------
33394: -- 4219869 Business Flow
33395: -- Update journal entry status -- Need to generate this within IF
33396: ----------------------------------------------------------------------------------
33397: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
33398: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
33399: ,p_balance_type_code => l_balance_type_code
33400: );
33401:
33504:
33505: --
33506: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
33507: --
33508: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
33509: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
33510: ELSE
33511: ---------------------------------------------------------------------------------------------------
33512: -- 4262811a Switch Sign
33529:
33530: XLA_AE_LINES_PKG.ValidateCurrentLine;
33531: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
33532:
33533: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
33534: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
33535: ,p_balance_type_code => l_balance_type_code);
33536:
33537: END IF;
33682: l_tmp_amt NUMBER;
33683: l_acc_rev_natural_side_code VARCHAR2(1);
33684:
33685: l_num_entries NUMBER;
33686: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
33687: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
33688: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
33689: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
33690: l_recog_line_1 NUMBER;
33683: l_acc_rev_natural_side_code VARCHAR2(1);
33684:
33685: l_num_entries NUMBER;
33686: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
33687: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
33688: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
33689: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
33690: l_recog_line_1 NUMBER;
33691: l_recog_line_2 NUMBER;
33684:
33685: l_num_entries NUMBER;
33686: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
33687: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
33688: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
33689: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
33690: l_recog_line_1 NUMBER;
33691: l_recog_line_2 NUMBER;
33692:
33685: l_num_entries NUMBER;
33686: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
33687: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
33688: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
33689: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
33690: l_recog_line_1 NUMBER;
33691: l_recog_line_2 NUMBER;
33692:
33693: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
33691: l_recog_line_2 NUMBER;
33692:
33693: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
33694: l_bflow_applied_to_amt NUMBER; -- 5132302
33695: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
33696:
33697: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
33698:
33699: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
33766: l_accrual_line_num := NULL; -- 4262811
33767: l_tmp_amt := NULL; -- 4262811
33768: --
33769:
33770: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
33771: l_balance_type_code <> 'B' THEN
33772: IF NVL(p_source_96,'
33773: ') = 'ALWAYS_CLEAR' AND
33774: (NVL(p_source_113,'
33847: --
33848: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
33849:
33850: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
33851: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
33852:
33853: -- 4955764
33854: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
33855: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
33921: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
33922:
33923: IF xla_accounting_cache_pkg.GetValueChar
33924: (p_source_code => 'LEDGER_CATEGORY_CODE'
33925: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
33926: AND l_bflow_method_code = 'PRIOR_ENTRY'
33927: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
33928: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
33929: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
34109: p_lookup_type => 'XLA_OWNER_TYPE'
34110: ,p_lookup_code => l_component_type_code
34111: )
34112: ,p_token_4 => 'PRODUCT_NAME'
34113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34117: ,p_ae_header_id => NULL
34110: ,p_lookup_code => l_component_type_code
34111: )
34112: ,p_token_4 => 'PRODUCT_NAME'
34113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34117: ,p_ae_header_id => NULL
34118: );
34111: )
34112: ,p_token_4 => 'PRODUCT_NAME'
34113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34117: ,p_ae_header_id => NULL
34118: );
34119:
34112: ,p_token_4 => 'PRODUCT_NAME'
34113: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34114: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34115: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34116: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34117: ,p_ae_header_id => NULL
34118: );
34119:
34120: IF (C_LEVEL_ERROR>= g_log_level) THEN
34143: ----------------------------------------------------------------------------------
34144: -- 4219869 Business Flow
34145: -- Update journal entry status -- Need to generate this within IF
34146: ----------------------------------------------------------------------------------
34147: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
34148: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
34149: ,p_balance_type_code => l_balance_type_code
34150: );
34151:
34297:
34298: --
34299: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
34300: --
34301: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
34302: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
34303: ELSE
34304: ---------------------------------------------------------------------------------------------------
34305: -- 4262811a Switch Sign
34322:
34323: XLA_AE_LINES_PKG.ValidateCurrentLine;
34324: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
34325:
34326: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
34327: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
34328: ,p_balance_type_code => l_balance_type_code);
34329:
34330: END IF;
34475: l_tmp_amt NUMBER;
34476: l_acc_rev_natural_side_code VARCHAR2(1);
34477:
34478: l_num_entries NUMBER;
34479: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
34480: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
34481: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
34482: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
34483: l_recog_line_1 NUMBER;
34476: l_acc_rev_natural_side_code VARCHAR2(1);
34477:
34478: l_num_entries NUMBER;
34479: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
34480: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
34481: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
34482: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
34483: l_recog_line_1 NUMBER;
34484: l_recog_line_2 NUMBER;
34477:
34478: l_num_entries NUMBER;
34479: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
34480: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
34481: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
34482: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
34483: l_recog_line_1 NUMBER;
34484: l_recog_line_2 NUMBER;
34485:
34478: l_num_entries NUMBER;
34479: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
34480: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
34481: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
34482: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
34483: l_recog_line_1 NUMBER;
34484: l_recog_line_2 NUMBER;
34485:
34486: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
34484: l_recog_line_2 NUMBER;
34485:
34486: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
34487: l_bflow_applied_to_amt NUMBER; -- 5132302
34488: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
34489:
34490: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
34491:
34492: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
34559: l_accrual_line_num := NULL; -- 4262811
34560: l_tmp_amt := NULL; -- 4262811
34561: --
34562:
34563: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
34564: l_balance_type_code <> 'B' THEN
34565: IF NVL(p_source_96,'
34566: ') = 'ALWAYS_CLEAR' AND
34567: (NVL(p_source_113,'
34640: --
34641: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
34642:
34643: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
34644: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
34645:
34646: -- 4955764
34647: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
34648: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
34714: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
34715:
34716: IF xla_accounting_cache_pkg.GetValueChar
34717: (p_source_code => 'LEDGER_CATEGORY_CODE'
34718: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
34719: AND l_bflow_method_code = 'PRIOR_ENTRY'
34720: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
34721: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
34722: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
34859: p_lookup_type => 'XLA_OWNER_TYPE'
34860: ,p_lookup_code => l_component_type_code
34861: )
34862: ,p_token_4 => 'PRODUCT_NAME'
34863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34867: ,p_ae_header_id => NULL
34860: ,p_lookup_code => l_component_type_code
34861: )
34862: ,p_token_4 => 'PRODUCT_NAME'
34863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34867: ,p_ae_header_id => NULL
34868: );
34861: )
34862: ,p_token_4 => 'PRODUCT_NAME'
34863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34867: ,p_ae_header_id => NULL
34868: );
34869:
34862: ,p_token_4 => 'PRODUCT_NAME'
34863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
34864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
34865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
34866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
34867: ,p_ae_header_id => NULL
34868: );
34869:
34870: IF (C_LEVEL_ERROR>= g_log_level) THEN
34893: ----------------------------------------------------------------------------------
34894: -- 4219869 Business Flow
34895: -- Update journal entry status -- Need to generate this within IF
34896: ----------------------------------------------------------------------------------
34897: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
34898: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
34899: ,p_balance_type_code => l_balance_type_code
34900: );
34901:
35004:
35005: --
35006: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
35007: --
35008: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
35009: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
35010: ELSE
35011: ---------------------------------------------------------------------------------------------------
35012: -- 4262811a Switch Sign
35029:
35030: XLA_AE_LINES_PKG.ValidateCurrentLine;
35031: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
35032:
35033: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
35034: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
35035: ,p_balance_type_code => l_balance_type_code);
35036:
35037: END IF;
35182: l_tmp_amt NUMBER;
35183: l_acc_rev_natural_side_code VARCHAR2(1);
35184:
35185: l_num_entries NUMBER;
35186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35190: l_recog_line_1 NUMBER;
35183: l_acc_rev_natural_side_code VARCHAR2(1);
35184:
35185: l_num_entries NUMBER;
35186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35190: l_recog_line_1 NUMBER;
35191: l_recog_line_2 NUMBER;
35184:
35185: l_num_entries NUMBER;
35186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35190: l_recog_line_1 NUMBER;
35191: l_recog_line_2 NUMBER;
35192:
35185: l_num_entries NUMBER;
35186: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35187: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35188: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35189: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35190: l_recog_line_1 NUMBER;
35191: l_recog_line_2 NUMBER;
35192:
35193: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
35191: l_recog_line_2 NUMBER;
35192:
35193: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
35194: l_bflow_applied_to_amt NUMBER; -- 5132302
35195: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
35196:
35197: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
35198:
35199: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
35266: l_accrual_line_num := NULL; -- 4262811
35267: l_tmp_amt := NULL; -- 4262811
35268: --
35269:
35270: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
35271: l_balance_type_code <> 'B' THEN
35272: IF NVL(p_source_96,'
35273: ') = 'ALWAYS_CLEAR' AND
35274: (NVL(p_source_47,'
35349: --
35350: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
35351:
35352: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
35353: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
35354:
35355: -- 4955764
35356: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
35357: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
35423: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
35424:
35425: IF xla_accounting_cache_pkg.GetValueChar
35426: (p_source_code => 'LEDGER_CATEGORY_CODE'
35427: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
35428: AND l_bflow_method_code = 'PRIOR_ENTRY'
35429: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
35430: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
35431: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
35541: p_lookup_type => 'XLA_OWNER_TYPE'
35542: ,p_lookup_code => l_component_type_code
35543: )
35544: ,p_token_4 => 'PRODUCT_NAME'
35545: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
35546: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
35547: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
35548: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
35549: ,p_ae_header_id => NULL
35542: ,p_lookup_code => l_component_type_code
35543: )
35544: ,p_token_4 => 'PRODUCT_NAME'
35545: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
35546: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
35547: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
35548: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
35549: ,p_ae_header_id => NULL
35550: );
35543: )
35544: ,p_token_4 => 'PRODUCT_NAME'
35545: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
35546: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
35547: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
35548: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
35549: ,p_ae_header_id => NULL
35550: );
35551:
35544: ,p_token_4 => 'PRODUCT_NAME'
35545: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
35546: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
35547: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
35548: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
35549: ,p_ae_header_id => NULL
35550: );
35551:
35552: IF (C_LEVEL_ERROR>= g_log_level) THEN
35575: ----------------------------------------------------------------------------------
35576: -- 4219869 Business Flow
35577: -- Update journal entry status -- Need to generate this within IF
35578: ----------------------------------------------------------------------------------
35579: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
35580: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
35581: ,p_balance_type_code => l_balance_type_code
35582: );
35583:
35662:
35663: --
35664: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
35665: --
35666: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
35667: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
35668: ELSE
35669: ---------------------------------------------------------------------------------------------------
35670: -- 4262811a Switch Sign
35687:
35688: XLA_AE_LINES_PKG.ValidateCurrentLine;
35689: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
35690:
35691: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
35692: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
35693: ,p_balance_type_code => l_balance_type_code);
35694:
35695: END IF;
35844: l_tmp_amt NUMBER;
35845: l_acc_rev_natural_side_code VARCHAR2(1);
35846:
35847: l_num_entries NUMBER;
35848: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35849: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35850: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35851: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35852: l_recog_line_1 NUMBER;
35845: l_acc_rev_natural_side_code VARCHAR2(1);
35846:
35847: l_num_entries NUMBER;
35848: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35849: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35850: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35851: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35852: l_recog_line_1 NUMBER;
35853: l_recog_line_2 NUMBER;
35846:
35847: l_num_entries NUMBER;
35848: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35849: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35850: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35851: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35852: l_recog_line_1 NUMBER;
35853: l_recog_line_2 NUMBER;
35854:
35847: l_num_entries NUMBER;
35848: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
35849: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
35850: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
35851: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
35852: l_recog_line_1 NUMBER;
35853: l_recog_line_2 NUMBER;
35854:
35855: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
35853: l_recog_line_2 NUMBER;
35854:
35855: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
35856: l_bflow_applied_to_amt NUMBER; -- 5132302
35857: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
35858:
35859: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
35860:
35861: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
35928: l_accrual_line_num := NULL; -- 4262811
35929: l_tmp_amt := NULL; -- 4262811
35930: --
35931:
35932: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
35933: l_balance_type_code <> 'B' THEN
35934: IF NVL(p_source_96,'
35935: ') = 'ISSUE_ISSUE' AND
35936: (NVL(p_source_47,'
36013: --
36014: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
36015:
36016: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
36017: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
36018:
36019: -- 4955764
36020: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
36021: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
36089: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
36090:
36091: IF xla_accounting_cache_pkg.GetValueChar
36092: (p_source_code => 'LEDGER_CATEGORY_CODE'
36093: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
36094: AND l_bflow_method_code = 'PRIOR_ENTRY'
36095: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
36096: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
36097: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
36207: p_lookup_type => 'XLA_OWNER_TYPE'
36208: ,p_lookup_code => l_component_type_code
36209: )
36210: ,p_token_4 => 'PRODUCT_NAME'
36211: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36212: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36213: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36214: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36215: ,p_ae_header_id => NULL
36208: ,p_lookup_code => l_component_type_code
36209: )
36210: ,p_token_4 => 'PRODUCT_NAME'
36211: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36212: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36213: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36214: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36215: ,p_ae_header_id => NULL
36216: );
36209: )
36210: ,p_token_4 => 'PRODUCT_NAME'
36211: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36212: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36213: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36214: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36215: ,p_ae_header_id => NULL
36216: );
36217:
36210: ,p_token_4 => 'PRODUCT_NAME'
36211: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36212: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36213: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36214: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36215: ,p_ae_header_id => NULL
36216: );
36217:
36218: IF (C_LEVEL_ERROR>= g_log_level) THEN
36241: ----------------------------------------------------------------------------------
36242: -- 4219869 Business Flow
36243: -- Update journal entry status -- Need to generate this within IF
36244: ----------------------------------------------------------------------------------
36245: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
36246: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
36247: ,p_balance_type_code => l_balance_type_code
36248: );
36249:
36328:
36329: --
36330: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
36331: --
36332: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
36333: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
36334: ELSE
36335: ---------------------------------------------------------------------------------------------------
36336: -- 4262811a Switch Sign
36353:
36354: XLA_AE_LINES_PKG.ValidateCurrentLine;
36355: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
36356:
36357: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
36358: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
36359: ,p_balance_type_code => l_balance_type_code);
36360:
36361: END IF;
36510: l_tmp_amt NUMBER;
36511: l_acc_rev_natural_side_code VARCHAR2(1);
36512:
36513: l_num_entries NUMBER;
36514: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
36515: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
36516: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
36517: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
36518: l_recog_line_1 NUMBER;
36511: l_acc_rev_natural_side_code VARCHAR2(1);
36512:
36513: l_num_entries NUMBER;
36514: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
36515: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
36516: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
36517: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
36518: l_recog_line_1 NUMBER;
36519: l_recog_line_2 NUMBER;
36512:
36513: l_num_entries NUMBER;
36514: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
36515: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
36516: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
36517: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
36518: l_recog_line_1 NUMBER;
36519: l_recog_line_2 NUMBER;
36520:
36513: l_num_entries NUMBER;
36514: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
36515: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
36516: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
36517: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
36518: l_recog_line_1 NUMBER;
36519: l_recog_line_2 NUMBER;
36520:
36521: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
36519: l_recog_line_2 NUMBER;
36520:
36521: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
36522: l_bflow_applied_to_amt NUMBER; -- 5132302
36523: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
36524:
36525: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
36526:
36527: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
36594: l_accrual_line_num := NULL; -- 4262811
36595: l_tmp_amt := NULL; -- 4262811
36596: --
36597:
36598: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
36599: l_balance_type_code <> 'B' THEN
36600: IF NVL(p_source_96,'
36601: ') = 'ISSUE_ISSUE' AND
36602: (NVL(p_source_113,'
36677: --
36678: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
36679:
36680: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
36681: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
36682:
36683: -- 4955764
36684: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
36685: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
36753: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
36754:
36755: IF xla_accounting_cache_pkg.GetValueChar
36756: (p_source_code => 'LEDGER_CATEGORY_CODE'
36757: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
36758: AND l_bflow_method_code = 'PRIOR_ENTRY'
36759: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
36760: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
36761: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
36941: p_lookup_type => 'XLA_OWNER_TYPE'
36942: ,p_lookup_code => l_component_type_code
36943: )
36944: ,p_token_4 => 'PRODUCT_NAME'
36945: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36946: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36947: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36948: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36949: ,p_ae_header_id => NULL
36942: ,p_lookup_code => l_component_type_code
36943: )
36944: ,p_token_4 => 'PRODUCT_NAME'
36945: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36946: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36947: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36948: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36949: ,p_ae_header_id => NULL
36950: );
36943: )
36944: ,p_token_4 => 'PRODUCT_NAME'
36945: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36946: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36947: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36948: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36949: ,p_ae_header_id => NULL
36950: );
36951:
36944: ,p_token_4 => 'PRODUCT_NAME'
36945: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
36946: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
36947: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
36948: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
36949: ,p_ae_header_id => NULL
36950: );
36951:
36952: IF (C_LEVEL_ERROR>= g_log_level) THEN
36975: ----------------------------------------------------------------------------------
36976: -- 4219869 Business Flow
36977: -- Update journal entry status -- Need to generate this within IF
36978: ----------------------------------------------------------------------------------
36979: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
36980: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
36981: ,p_balance_type_code => l_balance_type_code
36982: );
36983:
37129:
37130: --
37131: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
37132: --
37133: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
37134: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
37135: ELSE
37136: ---------------------------------------------------------------------------------------------------
37137: -- 4262811a Switch Sign
37154:
37155: XLA_AE_LINES_PKG.ValidateCurrentLine;
37156: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
37157:
37158: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
37159: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
37160: ,p_balance_type_code => l_balance_type_code);
37161:
37162: END IF;
37311: l_tmp_amt NUMBER;
37312: l_acc_rev_natural_side_code VARCHAR2(1);
37313:
37314: l_num_entries NUMBER;
37315: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
37316: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
37317: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
37318: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
37319: l_recog_line_1 NUMBER;
37312: l_acc_rev_natural_side_code VARCHAR2(1);
37313:
37314: l_num_entries NUMBER;
37315: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
37316: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
37317: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
37318: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
37319: l_recog_line_1 NUMBER;
37320: l_recog_line_2 NUMBER;
37313:
37314: l_num_entries NUMBER;
37315: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
37316: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
37317: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
37318: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
37319: l_recog_line_1 NUMBER;
37320: l_recog_line_2 NUMBER;
37321:
37314: l_num_entries NUMBER;
37315: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
37316: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
37317: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
37318: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
37319: l_recog_line_1 NUMBER;
37320: l_recog_line_2 NUMBER;
37321:
37322: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
37320: l_recog_line_2 NUMBER;
37321:
37322: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
37323: l_bflow_applied_to_amt NUMBER; -- 5132302
37324: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
37325:
37326: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
37327:
37328: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
37395: l_accrual_line_num := NULL; -- 4262811
37396: l_tmp_amt := NULL; -- 4262811
37397: --
37398:
37399: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
37400: l_balance_type_code <> 'B' THEN
37401: IF NVL(p_source_96,'
37402: ') = 'ISSUE_ISSUE' AND
37403: (NVL(p_source_113,'
37478: --
37479: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
37480:
37481: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
37482: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
37483:
37484: -- 4955764
37485: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
37486: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
37554: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
37555:
37556: IF xla_accounting_cache_pkg.GetValueChar
37557: (p_source_code => 'LEDGER_CATEGORY_CODE'
37558: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
37559: AND l_bflow_method_code = 'PRIOR_ENTRY'
37560: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
37561: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
37562: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
37699: p_lookup_type => 'XLA_OWNER_TYPE'
37700: ,p_lookup_code => l_component_type_code
37701: )
37702: ,p_token_4 => 'PRODUCT_NAME'
37703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
37704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
37705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
37706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
37707: ,p_ae_header_id => NULL
37700: ,p_lookup_code => l_component_type_code
37701: )
37702: ,p_token_4 => 'PRODUCT_NAME'
37703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
37704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
37705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
37706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
37707: ,p_ae_header_id => NULL
37708: );
37701: )
37702: ,p_token_4 => 'PRODUCT_NAME'
37703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
37704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
37705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
37706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
37707: ,p_ae_header_id => NULL
37708: );
37709:
37702: ,p_token_4 => 'PRODUCT_NAME'
37703: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
37704: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
37705: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
37706: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
37707: ,p_ae_header_id => NULL
37708: );
37709:
37710: IF (C_LEVEL_ERROR>= g_log_level) THEN
37733: ----------------------------------------------------------------------------------
37734: -- 4219869 Business Flow
37735: -- Update journal entry status -- Need to generate this within IF
37736: ----------------------------------------------------------------------------------
37737: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
37738: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
37739: ,p_balance_type_code => l_balance_type_code
37740: );
37741:
37844:
37845: --
37846: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
37847: --
37848: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
37849: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
37850: ELSE
37851: ---------------------------------------------------------------------------------------------------
37852: -- 4262811a Switch Sign
37869:
37870: XLA_AE_LINES_PKG.ValidateCurrentLine;
37871: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
37872:
37873: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
37874: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
37875: ,p_balance_type_code => l_balance_type_code);
37876:
37877: END IF;
38013: l_tmp_amt NUMBER;
38014: l_acc_rev_natural_side_code VARCHAR2(1);
38015:
38016: l_num_entries NUMBER;
38017: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38018: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38019: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38020: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38021: l_recog_line_1 NUMBER;
38014: l_acc_rev_natural_side_code VARCHAR2(1);
38015:
38016: l_num_entries NUMBER;
38017: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38018: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38019: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38020: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38021: l_recog_line_1 NUMBER;
38022: l_recog_line_2 NUMBER;
38015:
38016: l_num_entries NUMBER;
38017: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38018: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38019: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38020: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38021: l_recog_line_1 NUMBER;
38022: l_recog_line_2 NUMBER;
38023:
38016: l_num_entries NUMBER;
38017: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38018: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38019: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38020: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38021: l_recog_line_1 NUMBER;
38022: l_recog_line_2 NUMBER;
38023:
38024: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
38022: l_recog_line_2 NUMBER;
38023:
38024: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
38025: l_bflow_applied_to_amt NUMBER; -- 5132302
38026: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
38027:
38028: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
38029:
38030: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
38097: l_accrual_line_num := NULL; -- 4262811
38098: l_tmp_amt := NULL; -- 4262811
38099: --
38100:
38101: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
38102: l_balance_type_code <> 'B' THEN
38103: IF NVL(p_source_96,'
38104: ') = 'ISSUE_ISSUE' AND
38105: (NVL(p_source_47,'
38178: --
38179: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
38180:
38181: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
38182: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
38183:
38184: -- 4955764
38185: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
38186: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
38246: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
38247:
38248: IF xla_accounting_cache_pkg.GetValueChar
38249: (p_source_code => 'LEDGER_CATEGORY_CODE'
38250: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
38251: AND l_bflow_method_code = 'PRIOR_ENTRY'
38252: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
38253: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
38254: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
38364: p_lookup_type => 'XLA_OWNER_TYPE'
38365: ,p_lookup_code => l_component_type_code
38366: )
38367: ,p_token_4 => 'PRODUCT_NAME'
38368: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
38369: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
38370: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
38371: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
38372: ,p_ae_header_id => NULL
38365: ,p_lookup_code => l_component_type_code
38366: )
38367: ,p_token_4 => 'PRODUCT_NAME'
38368: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
38369: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
38370: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
38371: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
38372: ,p_ae_header_id => NULL
38373: );
38366: )
38367: ,p_token_4 => 'PRODUCT_NAME'
38368: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
38369: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
38370: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
38371: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
38372: ,p_ae_header_id => NULL
38373: );
38374:
38367: ,p_token_4 => 'PRODUCT_NAME'
38368: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
38369: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
38370: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
38371: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
38372: ,p_ae_header_id => NULL
38373: );
38374:
38375: IF (C_LEVEL_ERROR>= g_log_level) THEN
38398: ----------------------------------------------------------------------------------
38399: -- 4219869 Business Flow
38400: -- Update journal entry status -- Need to generate this within IF
38401: ----------------------------------------------------------------------------------
38402: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
38403: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
38404: ,p_balance_type_code => l_balance_type_code
38405: );
38406:
38485:
38486: --
38487: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
38488: --
38489: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
38490: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
38491: ELSE
38492: ---------------------------------------------------------------------------------------------------
38493: -- 4262811a Switch Sign
38510:
38511: XLA_AE_LINES_PKG.ValidateCurrentLine;
38512: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
38513:
38514: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
38515: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
38516: ,p_balance_type_code => l_balance_type_code);
38517:
38518: END IF;
38654: l_tmp_amt NUMBER;
38655: l_acc_rev_natural_side_code VARCHAR2(1);
38656:
38657: l_num_entries NUMBER;
38658: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38659: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38660: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38661: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38662: l_recog_line_1 NUMBER;
38655: l_acc_rev_natural_side_code VARCHAR2(1);
38656:
38657: l_num_entries NUMBER;
38658: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38659: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38660: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38661: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38662: l_recog_line_1 NUMBER;
38663: l_recog_line_2 NUMBER;
38656:
38657: l_num_entries NUMBER;
38658: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38659: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38660: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38661: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38662: l_recog_line_1 NUMBER;
38663: l_recog_line_2 NUMBER;
38664:
38657: l_num_entries NUMBER;
38658: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
38659: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
38660: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
38661: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
38662: l_recog_line_1 NUMBER;
38663: l_recog_line_2 NUMBER;
38664:
38665: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
38663: l_recog_line_2 NUMBER;
38664:
38665: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
38666: l_bflow_applied_to_amt NUMBER; -- 5132302
38667: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
38668:
38669: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
38670:
38671: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
38738: l_accrual_line_num := NULL; -- 4262811
38739: l_tmp_amt := NULL; -- 4262811
38740: --
38741:
38742: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
38743: l_balance_type_code <> 'B' THEN
38744: IF NVL(p_source_96,'
38745: ') = 'ISSUE_ISSUE' AND
38746: (NVL(p_source_113,'
38817: --
38818: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
38819:
38820: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
38821: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
38822:
38823: -- 4955764
38824: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
38825: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
38885: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
38886:
38887: IF xla_accounting_cache_pkg.GetValueChar
38888: (p_source_code => 'LEDGER_CATEGORY_CODE'
38889: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
38890: AND l_bflow_method_code = 'PRIOR_ENTRY'
38891: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
38892: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
38893: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
39073: p_lookup_type => 'XLA_OWNER_TYPE'
39074: ,p_lookup_code => l_component_type_code
39075: )
39076: ,p_token_4 => 'PRODUCT_NAME'
39077: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39078: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39079: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39080: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39081: ,p_ae_header_id => NULL
39074: ,p_lookup_code => l_component_type_code
39075: )
39076: ,p_token_4 => 'PRODUCT_NAME'
39077: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39078: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39079: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39080: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39081: ,p_ae_header_id => NULL
39082: );
39075: )
39076: ,p_token_4 => 'PRODUCT_NAME'
39077: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39078: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39079: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39080: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39081: ,p_ae_header_id => NULL
39082: );
39083:
39076: ,p_token_4 => 'PRODUCT_NAME'
39077: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39078: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39079: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39080: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39081: ,p_ae_header_id => NULL
39082: );
39083:
39084: IF (C_LEVEL_ERROR>= g_log_level) THEN
39107: ----------------------------------------------------------------------------------
39108: -- 4219869 Business Flow
39109: -- Update journal entry status -- Need to generate this within IF
39110: ----------------------------------------------------------------------------------
39111: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
39112: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
39113: ,p_balance_type_code => l_balance_type_code
39114: );
39115:
39261:
39262: --
39263: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
39264: --
39265: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
39266: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
39267: ELSE
39268: ---------------------------------------------------------------------------------------------------
39269: -- 4262811a Switch Sign
39286:
39287: XLA_AE_LINES_PKG.ValidateCurrentLine;
39288: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
39289:
39290: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
39291: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
39292: ,p_balance_type_code => l_balance_type_code);
39293:
39294: END IF;
39430: l_tmp_amt NUMBER;
39431: l_acc_rev_natural_side_code VARCHAR2(1);
39432:
39433: l_num_entries NUMBER;
39434: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
39435: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
39436: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
39437: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
39438: l_recog_line_1 NUMBER;
39431: l_acc_rev_natural_side_code VARCHAR2(1);
39432:
39433: l_num_entries NUMBER;
39434: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
39435: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
39436: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
39437: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
39438: l_recog_line_1 NUMBER;
39439: l_recog_line_2 NUMBER;
39432:
39433: l_num_entries NUMBER;
39434: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
39435: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
39436: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
39437: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
39438: l_recog_line_1 NUMBER;
39439: l_recog_line_2 NUMBER;
39440:
39433: l_num_entries NUMBER;
39434: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
39435: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
39436: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
39437: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
39438: l_recog_line_1 NUMBER;
39439: l_recog_line_2 NUMBER;
39440:
39441: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
39439: l_recog_line_2 NUMBER;
39440:
39441: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
39442: l_bflow_applied_to_amt NUMBER; -- 5132302
39443: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
39444:
39445: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
39446:
39447: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
39514: l_accrual_line_num := NULL; -- 4262811
39515: l_tmp_amt := NULL; -- 4262811
39516: --
39517:
39518: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
39519: l_balance_type_code <> 'B' THEN
39520: IF NVL(p_source_96,'
39521: ') = 'ISSUE_ISSUE' AND
39522: (NVL(p_source_113,'
39593: --
39594: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
39595:
39596: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
39597: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
39598:
39599: -- 4955764
39600: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
39601: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
39661: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
39662:
39663: IF xla_accounting_cache_pkg.GetValueChar
39664: (p_source_code => 'LEDGER_CATEGORY_CODE'
39665: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
39666: AND l_bflow_method_code = 'PRIOR_ENTRY'
39667: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
39668: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
39669: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
39806: p_lookup_type => 'XLA_OWNER_TYPE'
39807: ,p_lookup_code => l_component_type_code
39808: )
39809: ,p_token_4 => 'PRODUCT_NAME'
39810: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39811: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39812: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39813: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39814: ,p_ae_header_id => NULL
39807: ,p_lookup_code => l_component_type_code
39808: )
39809: ,p_token_4 => 'PRODUCT_NAME'
39810: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39811: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39812: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39813: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39814: ,p_ae_header_id => NULL
39815: );
39808: )
39809: ,p_token_4 => 'PRODUCT_NAME'
39810: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39811: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39812: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39813: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39814: ,p_ae_header_id => NULL
39815: );
39816:
39809: ,p_token_4 => 'PRODUCT_NAME'
39810: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
39811: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
39812: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
39813: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
39814: ,p_ae_header_id => NULL
39815: );
39816:
39817: IF (C_LEVEL_ERROR>= g_log_level) THEN
39840: ----------------------------------------------------------------------------------
39841: -- 4219869 Business Flow
39842: -- Update journal entry status -- Need to generate this within IF
39843: ----------------------------------------------------------------------------------
39844: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
39845: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
39846: ,p_balance_type_code => l_balance_type_code
39847: );
39848:
39951:
39952: --
39953: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
39954: --
39955: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
39956: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
39957: ELSE
39958: ---------------------------------------------------------------------------------------------------
39959: -- 4262811a Switch Sign
39976:
39977: XLA_AE_LINES_PKG.ValidateCurrentLine;
39978: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
39979:
39980: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
39981: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
39982: ,p_balance_type_code => l_balance_type_code);
39983:
39984: END IF;
40129: l_tmp_amt NUMBER;
40130: l_acc_rev_natural_side_code VARCHAR2(1);
40131:
40132: l_num_entries NUMBER;
40133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40137: l_recog_line_1 NUMBER;
40130: l_acc_rev_natural_side_code VARCHAR2(1);
40131:
40132: l_num_entries NUMBER;
40133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40137: l_recog_line_1 NUMBER;
40138: l_recog_line_2 NUMBER;
40131:
40132: l_num_entries NUMBER;
40133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40137: l_recog_line_1 NUMBER;
40138: l_recog_line_2 NUMBER;
40139:
40132: l_num_entries NUMBER;
40133: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40134: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40135: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40136: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40137: l_recog_line_1 NUMBER;
40138: l_recog_line_2 NUMBER;
40139:
40140: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
40138: l_recog_line_2 NUMBER;
40139:
40140: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
40141: l_bflow_applied_to_amt NUMBER; -- 5132302
40142: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
40143:
40144: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
40145:
40146: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
40213: l_accrual_line_num := NULL; -- 4262811
40214: l_tmp_amt := NULL; -- 4262811
40215: --
40216:
40217: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
40218: l_balance_type_code <> 'B' THEN
40219: IF NVL(p_source_96,'
40220: ') = 'ISSUE_ISSUE' AND
40221: (NVL(p_source_47,'
40296: --
40297: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
40298:
40299: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
40300: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
40301:
40302: -- 4955764
40303: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
40304: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
40370: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
40371:
40372: IF xla_accounting_cache_pkg.GetValueChar
40373: (p_source_code => 'LEDGER_CATEGORY_CODE'
40374: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
40375: AND l_bflow_method_code = 'PRIOR_ENTRY'
40376: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
40377: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
40378: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
40488: p_lookup_type => 'XLA_OWNER_TYPE'
40489: ,p_lookup_code => l_component_type_code
40490: )
40491: ,p_token_4 => 'PRODUCT_NAME'
40492: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
40493: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
40494: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
40495: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
40496: ,p_ae_header_id => NULL
40489: ,p_lookup_code => l_component_type_code
40490: )
40491: ,p_token_4 => 'PRODUCT_NAME'
40492: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
40493: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
40494: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
40495: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
40496: ,p_ae_header_id => NULL
40497: );
40490: )
40491: ,p_token_4 => 'PRODUCT_NAME'
40492: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
40493: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
40494: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
40495: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
40496: ,p_ae_header_id => NULL
40497: );
40498:
40491: ,p_token_4 => 'PRODUCT_NAME'
40492: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
40493: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
40494: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
40495: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
40496: ,p_ae_header_id => NULL
40497: );
40498:
40499: IF (C_LEVEL_ERROR>= g_log_level) THEN
40522: ----------------------------------------------------------------------------------
40523: -- 4219869 Business Flow
40524: -- Update journal entry status -- Need to generate this within IF
40525: ----------------------------------------------------------------------------------
40526: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
40527: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
40528: ,p_balance_type_code => l_balance_type_code
40529: );
40530:
40609:
40610: --
40611: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
40612: --
40613: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
40614: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
40615: ELSE
40616: ---------------------------------------------------------------------------------------------------
40617: -- 4262811a Switch Sign
40634:
40635: XLA_AE_LINES_PKG.ValidateCurrentLine;
40636: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
40637:
40638: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
40639: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
40640: ,p_balance_type_code => l_balance_type_code);
40641:
40642: END IF;
40787: l_tmp_amt NUMBER;
40788: l_acc_rev_natural_side_code VARCHAR2(1);
40789:
40790: l_num_entries NUMBER;
40791: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40792: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40793: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40794: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40795: l_recog_line_1 NUMBER;
40788: l_acc_rev_natural_side_code VARCHAR2(1);
40789:
40790: l_num_entries NUMBER;
40791: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40792: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40793: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40794: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40795: l_recog_line_1 NUMBER;
40796: l_recog_line_2 NUMBER;
40789:
40790: l_num_entries NUMBER;
40791: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40792: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40793: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40794: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40795: l_recog_line_1 NUMBER;
40796: l_recog_line_2 NUMBER;
40797:
40790: l_num_entries NUMBER;
40791: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
40792: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
40793: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
40794: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
40795: l_recog_line_1 NUMBER;
40796: l_recog_line_2 NUMBER;
40797:
40798: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
40796: l_recog_line_2 NUMBER;
40797:
40798: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
40799: l_bflow_applied_to_amt NUMBER; -- 5132302
40800: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
40801:
40802: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
40803:
40804: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
40871: l_accrual_line_num := NULL; -- 4262811
40872: l_tmp_amt := NULL; -- 4262811
40873: --
40874:
40875: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
40876: l_balance_type_code <> 'B' THEN
40877: IF NVL(p_source_96,'
40878: ') = 'ISSUE_ISSUE' AND
40879: (NVL(p_source_113,'
40952: --
40953: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
40954:
40955: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
40956: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
40957:
40958: -- 4955764
40959: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
40960: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
41026: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
41027:
41028: IF xla_accounting_cache_pkg.GetValueChar
41029: (p_source_code => 'LEDGER_CATEGORY_CODE'
41030: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
41031: AND l_bflow_method_code = 'PRIOR_ENTRY'
41032: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
41033: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
41034: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
41214: p_lookup_type => 'XLA_OWNER_TYPE'
41215: ,p_lookup_code => l_component_type_code
41216: )
41217: ,p_token_4 => 'PRODUCT_NAME'
41218: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41219: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41220: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41221: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41222: ,p_ae_header_id => NULL
41215: ,p_lookup_code => l_component_type_code
41216: )
41217: ,p_token_4 => 'PRODUCT_NAME'
41218: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41219: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41220: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41221: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41222: ,p_ae_header_id => NULL
41223: );
41216: )
41217: ,p_token_4 => 'PRODUCT_NAME'
41218: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41219: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41220: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41221: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41222: ,p_ae_header_id => NULL
41223: );
41224:
41217: ,p_token_4 => 'PRODUCT_NAME'
41218: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41219: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41220: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41221: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41222: ,p_ae_header_id => NULL
41223: );
41224:
41225: IF (C_LEVEL_ERROR>= g_log_level) THEN
41248: ----------------------------------------------------------------------------------
41249: -- 4219869 Business Flow
41250: -- Update journal entry status -- Need to generate this within IF
41251: ----------------------------------------------------------------------------------
41252: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
41253: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
41254: ,p_balance_type_code => l_balance_type_code
41255: );
41256:
41402:
41403: --
41404: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
41405: --
41406: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
41407: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
41408: ELSE
41409: ---------------------------------------------------------------------------------------------------
41410: -- 4262811a Switch Sign
41427:
41428: XLA_AE_LINES_PKG.ValidateCurrentLine;
41429: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
41430:
41431: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
41432: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
41433: ,p_balance_type_code => l_balance_type_code);
41434:
41435: END IF;
41580: l_tmp_amt NUMBER;
41581: l_acc_rev_natural_side_code VARCHAR2(1);
41582:
41583: l_num_entries NUMBER;
41584: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
41585: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
41586: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
41587: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
41588: l_recog_line_1 NUMBER;
41581: l_acc_rev_natural_side_code VARCHAR2(1);
41582:
41583: l_num_entries NUMBER;
41584: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
41585: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
41586: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
41587: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
41588: l_recog_line_1 NUMBER;
41589: l_recog_line_2 NUMBER;
41582:
41583: l_num_entries NUMBER;
41584: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
41585: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
41586: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
41587: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
41588: l_recog_line_1 NUMBER;
41589: l_recog_line_2 NUMBER;
41590:
41583: l_num_entries NUMBER;
41584: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
41585: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
41586: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
41587: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
41588: l_recog_line_1 NUMBER;
41589: l_recog_line_2 NUMBER;
41590:
41591: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
41589: l_recog_line_2 NUMBER;
41590:
41591: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
41592: l_bflow_applied_to_amt NUMBER; -- 5132302
41593: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
41594:
41595: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
41596:
41597: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
41664: l_accrual_line_num := NULL; -- 4262811
41665: l_tmp_amt := NULL; -- 4262811
41666: --
41667:
41668: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
41669: l_balance_type_code <> 'B' THEN
41670: IF NVL(p_source_96,'
41671: ') = 'ISSUE_ISSUE' AND
41672: (NVL(p_source_113,'
41745: --
41746: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
41747:
41748: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
41749: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
41750:
41751: -- 4955764
41752: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
41753: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
41819: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
41820:
41821: IF xla_accounting_cache_pkg.GetValueChar
41822: (p_source_code => 'LEDGER_CATEGORY_CODE'
41823: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
41824: AND l_bflow_method_code = 'PRIOR_ENTRY'
41825: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
41826: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
41827: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
41964: p_lookup_type => 'XLA_OWNER_TYPE'
41965: ,p_lookup_code => l_component_type_code
41966: )
41967: ,p_token_4 => 'PRODUCT_NAME'
41968: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41969: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41970: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41971: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41972: ,p_ae_header_id => NULL
41965: ,p_lookup_code => l_component_type_code
41966: )
41967: ,p_token_4 => 'PRODUCT_NAME'
41968: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41969: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41970: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41971: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41972: ,p_ae_header_id => NULL
41973: );
41966: )
41967: ,p_token_4 => 'PRODUCT_NAME'
41968: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41969: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41970: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41971: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41972: ,p_ae_header_id => NULL
41973: );
41974:
41967: ,p_token_4 => 'PRODUCT_NAME'
41968: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
41969: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
41970: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
41971: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
41972: ,p_ae_header_id => NULL
41973: );
41974:
41975: IF (C_LEVEL_ERROR>= g_log_level) THEN
41998: ----------------------------------------------------------------------------------
41999: -- 4219869 Business Flow
42000: -- Update journal entry status -- Need to generate this within IF
42001: ----------------------------------------------------------------------------------
42002: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
42003: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
42004: ,p_balance_type_code => l_balance_type_code
42005: );
42006:
42109:
42110: --
42111: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
42112: --
42113: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
42114: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
42115: ELSE
42116: ---------------------------------------------------------------------------------------------------
42117: -- 4262811a Switch Sign
42134:
42135: XLA_AE_LINES_PKG.ValidateCurrentLine;
42136: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
42137:
42138: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
42139: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
42140: ,p_balance_type_code => l_balance_type_code);
42141:
42142: END IF;
42283: l_tmp_amt NUMBER;
42284: l_acc_rev_natural_side_code VARCHAR2(1);
42285:
42286: l_num_entries NUMBER;
42287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42291: l_recog_line_1 NUMBER;
42284: l_acc_rev_natural_side_code VARCHAR2(1);
42285:
42286: l_num_entries NUMBER;
42287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42291: l_recog_line_1 NUMBER;
42292: l_recog_line_2 NUMBER;
42285:
42286: l_num_entries NUMBER;
42287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42291: l_recog_line_1 NUMBER;
42292: l_recog_line_2 NUMBER;
42293:
42286: l_num_entries NUMBER;
42287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42291: l_recog_line_1 NUMBER;
42292: l_recog_line_2 NUMBER;
42293:
42294: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
42292: l_recog_line_2 NUMBER;
42293:
42294: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
42295: l_bflow_applied_to_amt NUMBER; -- 5132302
42296: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
42297:
42298: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
42299:
42300: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
42367: l_accrual_line_num := NULL; -- 4262811
42368: l_tmp_amt := NULL; -- 4262811
42369: --
42370:
42371: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
42372: l_balance_type_code <> 'B' THEN
42373: IF NVL(p_source_96,'
42374: ') = 'CLEAR_CLEAR' AND
42375: NVL(p_source_33,'
42449: --
42450: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
42451:
42452: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
42453: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
42454:
42455: -- 4955764
42456: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
42457: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
42525: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
42526:
42527: IF xla_accounting_cache_pkg.GetValueChar
42528: (p_source_code => 'LEDGER_CATEGORY_CODE'
42529: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
42530: AND l_bflow_method_code = 'PRIOR_ENTRY'
42531: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
42532: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
42533: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
42643: p_lookup_type => 'XLA_OWNER_TYPE'
42644: ,p_lookup_code => l_component_type_code
42645: )
42646: ,p_token_4 => 'PRODUCT_NAME'
42647: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
42648: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
42649: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
42650: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
42651: ,p_ae_header_id => NULL
42644: ,p_lookup_code => l_component_type_code
42645: )
42646: ,p_token_4 => 'PRODUCT_NAME'
42647: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
42648: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
42649: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
42650: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
42651: ,p_ae_header_id => NULL
42652: );
42645: )
42646: ,p_token_4 => 'PRODUCT_NAME'
42647: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
42648: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
42649: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
42650: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
42651: ,p_ae_header_id => NULL
42652: );
42653:
42646: ,p_token_4 => 'PRODUCT_NAME'
42647: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
42648: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
42649: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
42650: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
42651: ,p_ae_header_id => NULL
42652: );
42653:
42654: IF (C_LEVEL_ERROR>= g_log_level) THEN
42677: ----------------------------------------------------------------------------------
42678: -- 4219869 Business Flow
42679: -- Update journal entry status -- Need to generate this within IF
42680: ----------------------------------------------------------------------------------
42681: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
42682: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
42683: ,p_balance_type_code => l_balance_type_code
42684: );
42685:
42764:
42765: --
42766: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
42767: --
42768: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
42769: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
42770: ELSE
42771: ---------------------------------------------------------------------------------------------------
42772: -- 4262811a Switch Sign
42789:
42790: XLA_AE_LINES_PKG.ValidateCurrentLine;
42791: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
42792:
42793: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
42794: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
42795: ,p_balance_type_code => l_balance_type_code);
42796:
42797: END IF;
42924: l_tmp_amt NUMBER;
42925: l_acc_rev_natural_side_code VARCHAR2(1);
42926:
42927: l_num_entries NUMBER;
42928: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42929: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42930: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42931: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42932: l_recog_line_1 NUMBER;
42925: l_acc_rev_natural_side_code VARCHAR2(1);
42926:
42927: l_num_entries NUMBER;
42928: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42929: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42930: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42931: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42932: l_recog_line_1 NUMBER;
42933: l_recog_line_2 NUMBER;
42926:
42927: l_num_entries NUMBER;
42928: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42929: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42930: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42931: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42932: l_recog_line_1 NUMBER;
42933: l_recog_line_2 NUMBER;
42934:
42927: l_num_entries NUMBER;
42928: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
42929: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
42930: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
42931: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
42932: l_recog_line_1 NUMBER;
42933: l_recog_line_2 NUMBER;
42934:
42935: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
42933: l_recog_line_2 NUMBER;
42934:
42935: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
42936: l_bflow_applied_to_amt NUMBER; -- 5132302
42937: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
42938:
42939: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
42940:
42941: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
43008: l_accrual_line_num := NULL; -- 4262811
43009: l_tmp_amt := NULL; -- 4262811
43010: --
43011:
43012: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
43013: l_balance_type_code <> 'B' THEN
43014: IF NVL(p_source_96,'
43015: ') = 'CLEAR_CLEAR' AND
43016: NVL(p_source_33,'
43090: --
43091: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
43092:
43093: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
43094: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
43095:
43096: -- 4955764
43097: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
43098: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
43156: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
43157:
43158: IF xla_accounting_cache_pkg.GetValueChar
43159: (p_source_code => 'LEDGER_CATEGORY_CODE'
43160: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
43161: AND l_bflow_method_code = 'PRIOR_ENTRY'
43162: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
43163: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
43164: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
43233: p_lookup_type => 'XLA_OWNER_TYPE'
43234: ,p_lookup_code => l_component_type_code
43235: )
43236: ,p_token_4 => 'PRODUCT_NAME'
43237: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43238: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43239: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43240: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43241: ,p_ae_header_id => NULL
43234: ,p_lookup_code => l_component_type_code
43235: )
43236: ,p_token_4 => 'PRODUCT_NAME'
43237: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43238: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43239: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43240: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43241: ,p_ae_header_id => NULL
43242: );
43235: )
43236: ,p_token_4 => 'PRODUCT_NAME'
43237: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43238: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43239: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43240: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43241: ,p_ae_header_id => NULL
43242: );
43243:
43236: ,p_token_4 => 'PRODUCT_NAME'
43237: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43238: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43239: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43240: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43241: ,p_ae_header_id => NULL
43242: );
43243:
43244: IF (C_LEVEL_ERROR>= g_log_level) THEN
43267: ----------------------------------------------------------------------------------
43268: -- 4219869 Business Flow
43269: -- Update journal entry status -- Need to generate this within IF
43270: ----------------------------------------------------------------------------------
43271: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
43272: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
43273: ,p_balance_type_code => l_balance_type_code
43274: );
43275:
43328:
43329: --
43330: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
43331: --
43332: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
43333: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
43334: ELSE
43335: ---------------------------------------------------------------------------------------------------
43336: -- 4262811a Switch Sign
43353:
43354: XLA_AE_LINES_PKG.ValidateCurrentLine;
43355: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
43356:
43357: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
43358: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
43359: ,p_balance_type_code => l_balance_type_code);
43360:
43361: END IF;
43483: l_tmp_amt NUMBER;
43484: l_acc_rev_natural_side_code VARCHAR2(1);
43485:
43486: l_num_entries NUMBER;
43487: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
43488: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
43489: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
43490: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
43491: l_recog_line_1 NUMBER;
43484: l_acc_rev_natural_side_code VARCHAR2(1);
43485:
43486: l_num_entries NUMBER;
43487: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
43488: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
43489: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
43490: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
43491: l_recog_line_1 NUMBER;
43492: l_recog_line_2 NUMBER;
43485:
43486: l_num_entries NUMBER;
43487: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
43488: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
43489: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
43490: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
43491: l_recog_line_1 NUMBER;
43492: l_recog_line_2 NUMBER;
43493:
43486: l_num_entries NUMBER;
43487: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
43488: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
43489: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
43490: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
43491: l_recog_line_1 NUMBER;
43492: l_recog_line_2 NUMBER;
43493:
43494: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
43492: l_recog_line_2 NUMBER;
43493:
43494: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
43495: l_bflow_applied_to_amt NUMBER; -- 5132302
43496: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
43497:
43498: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
43499:
43500: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
43567: l_accrual_line_num := NULL; -- 4262811
43568: l_tmp_amt := NULL; -- 4262811
43569: --
43570:
43571: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
43572: l_balance_type_code <> 'B' THEN
43573: IF NVL(p_source_96,'
43574: ') <> 'CLEAR_CLEAR' AND
43575: NVL(p_source_33,'
43648: --
43649: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
43650:
43651: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
43652: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
43653:
43654: -- 4955764
43655: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
43656: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
43706: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
43707:
43708: IF xla_accounting_cache_pkg.GetValueChar
43709: (p_source_code => 'LEDGER_CATEGORY_CODE'
43710: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
43711: AND l_bflow_method_code = 'PRIOR_ENTRY'
43712: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
43713: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
43714: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
43783: p_lookup_type => 'XLA_OWNER_TYPE'
43784: ,p_lookup_code => l_component_type_code
43785: )
43786: ,p_token_4 => 'PRODUCT_NAME'
43787: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43788: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43789: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43790: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43791: ,p_ae_header_id => NULL
43784: ,p_lookup_code => l_component_type_code
43785: )
43786: ,p_token_4 => 'PRODUCT_NAME'
43787: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43788: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43789: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43790: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43791: ,p_ae_header_id => NULL
43792: );
43785: )
43786: ,p_token_4 => 'PRODUCT_NAME'
43787: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43788: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43789: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43790: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43791: ,p_ae_header_id => NULL
43792: );
43793:
43786: ,p_token_4 => 'PRODUCT_NAME'
43787: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
43788: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
43789: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
43790: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
43791: ,p_ae_header_id => NULL
43792: );
43793:
43794: IF (C_LEVEL_ERROR>= g_log_level) THEN
43817: ----------------------------------------------------------------------------------
43818: -- 4219869 Business Flow
43819: -- Update journal entry status -- Need to generate this within IF
43820: ----------------------------------------------------------------------------------
43821: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
43822: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
43823: ,p_balance_type_code => l_balance_type_code
43824: );
43825:
43878:
43879: --
43880: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
43881: --
43882: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
43883: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
43884: ELSE
43885: ---------------------------------------------------------------------------------------------------
43886: -- 4262811a Switch Sign
43903:
43904: XLA_AE_LINES_PKG.ValidateCurrentLine;
43905: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
43906:
43907: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
43908: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
43909: ,p_balance_type_code => l_balance_type_code);
43910:
43911: END IF;
44048: l_tmp_amt NUMBER;
44049: l_acc_rev_natural_side_code VARCHAR2(1);
44050:
44051: l_num_entries NUMBER;
44052: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44053: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44054: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44055: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44056: l_recog_line_1 NUMBER;
44049: l_acc_rev_natural_side_code VARCHAR2(1);
44050:
44051: l_num_entries NUMBER;
44052: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44053: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44054: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44055: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44056: l_recog_line_1 NUMBER;
44057: l_recog_line_2 NUMBER;
44050:
44051: l_num_entries NUMBER;
44052: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44053: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44054: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44055: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44056: l_recog_line_1 NUMBER;
44057: l_recog_line_2 NUMBER;
44058:
44051: l_num_entries NUMBER;
44052: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44053: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44054: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44055: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44056: l_recog_line_1 NUMBER;
44057: l_recog_line_2 NUMBER;
44058:
44059: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
44057: l_recog_line_2 NUMBER;
44058:
44059: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
44060: l_bflow_applied_to_amt NUMBER; -- 5132302
44061: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
44062:
44063: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
44064:
44065: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
44132: l_accrual_line_num := NULL; -- 4262811
44133: l_tmp_amt := NULL; -- 4262811
44134: --
44135:
44136: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
44137: l_balance_type_code <> 'B' THEN
44138: IF NVL(p_source_96,'
44139: ') <> 'CLEAR_CLEAR' AND
44140: ((NVL(p_source_33,'
44223: --
44224: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
44225:
44226: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
44227: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
44228:
44229: -- 4955764
44230: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
44231: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
44289: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
44290:
44291: IF xla_accounting_cache_pkg.GetValueChar
44292: (p_source_code => 'LEDGER_CATEGORY_CODE'
44293: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
44294: AND l_bflow_method_code = 'PRIOR_ENTRY'
44295: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
44296: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
44297: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
44366: p_lookup_type => 'XLA_OWNER_TYPE'
44367: ,p_lookup_code => l_component_type_code
44368: )
44369: ,p_token_4 => 'PRODUCT_NAME'
44370: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44371: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44372: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44373: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44374: ,p_ae_header_id => NULL
44367: ,p_lookup_code => l_component_type_code
44368: )
44369: ,p_token_4 => 'PRODUCT_NAME'
44370: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44371: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44372: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44373: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44374: ,p_ae_header_id => NULL
44375: );
44368: )
44369: ,p_token_4 => 'PRODUCT_NAME'
44370: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44371: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44372: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44373: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44374: ,p_ae_header_id => NULL
44375: );
44376:
44369: ,p_token_4 => 'PRODUCT_NAME'
44370: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44371: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44372: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44373: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44374: ,p_ae_header_id => NULL
44375: );
44376:
44377: IF (C_LEVEL_ERROR>= g_log_level) THEN
44400: ----------------------------------------------------------------------------------
44401: -- 4219869 Business Flow
44402: -- Update journal entry status -- Need to generate this within IF
44403: ----------------------------------------------------------------------------------
44404: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
44405: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
44406: ,p_balance_type_code => l_balance_type_code
44407: );
44408:
44461:
44462: --
44463: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
44464: --
44465: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
44466: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
44467: ELSE
44468: ---------------------------------------------------------------------------------------------------
44469: -- 4262811a Switch Sign
44486:
44487: XLA_AE_LINES_PKG.ValidateCurrentLine;
44488: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
44489:
44490: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
44491: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
44492: ,p_balance_type_code => l_balance_type_code);
44493:
44494: END IF;
44642: l_tmp_amt NUMBER;
44643: l_acc_rev_natural_side_code VARCHAR2(1);
44644:
44645: l_num_entries NUMBER;
44646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44650: l_recog_line_1 NUMBER;
44643: l_acc_rev_natural_side_code VARCHAR2(1);
44644:
44645: l_num_entries NUMBER;
44646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44650: l_recog_line_1 NUMBER;
44651: l_recog_line_2 NUMBER;
44644:
44645: l_num_entries NUMBER;
44646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44650: l_recog_line_1 NUMBER;
44651: l_recog_line_2 NUMBER;
44652:
44645: l_num_entries NUMBER;
44646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
44647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
44648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
44649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
44650: l_recog_line_1 NUMBER;
44651: l_recog_line_2 NUMBER;
44652:
44653: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
44651: l_recog_line_2 NUMBER;
44652:
44653: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
44654: l_bflow_applied_to_amt NUMBER; -- 5132302
44655: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
44656:
44657: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
44658:
44659: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
44726: l_accrual_line_num := NULL; -- 4262811
44727: l_tmp_amt := NULL; -- 4262811
44728: --
44729:
44730: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
44731: l_balance_type_code <> 'B' THEN
44732: IF NVL(p_source_125,'
44733: ') = 'DEFERRED'
44734: THEN
44798: --
44799: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
44800:
44801: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
44802: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
44803:
44804: -- 4955764
44805: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
44806: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
44914: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
44915:
44916: IF xla_accounting_cache_pkg.GetValueChar
44917: (p_source_code => 'LEDGER_CATEGORY_CODE'
44918: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
44919: AND l_bflow_method_code = 'PRIOR_ENTRY'
44920: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
44921: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
44922: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
44991: p_lookup_type => 'XLA_OWNER_TYPE'
44992: ,p_lookup_code => l_component_type_code
44993: )
44994: ,p_token_4 => 'PRODUCT_NAME'
44995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44999: ,p_ae_header_id => NULL
44992: ,p_lookup_code => l_component_type_code
44993: )
44994: ,p_token_4 => 'PRODUCT_NAME'
44995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44999: ,p_ae_header_id => NULL
45000: );
44993: )
44994: ,p_token_4 => 'PRODUCT_NAME'
44995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44999: ,p_ae_header_id => NULL
45000: );
45001:
44994: ,p_token_4 => 'PRODUCT_NAME'
44995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
44996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
44997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
44998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
44999: ,p_ae_header_id => NULL
45000: );
45001:
45002: IF (C_LEVEL_ERROR>= g_log_level) THEN
45025: ----------------------------------------------------------------------------------
45026: -- 4219869 Business Flow
45027: -- Update journal entry status -- Need to generate this within IF
45028: ----------------------------------------------------------------------------------
45029: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
45030: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
45031: ,p_balance_type_code => l_balance_type_code
45032: );
45033:
45086:
45087: --
45088: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
45089: --
45090: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
45091: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
45092: ELSE
45093: ---------------------------------------------------------------------------------------------------
45094: -- 4262811a Switch Sign
45111:
45112: XLA_AE_LINES_PKG.ValidateCurrentLine;
45113: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
45114:
45115: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
45116: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
45117: ,p_balance_type_code => l_balance_type_code);
45118:
45119: END IF;
45287: l_tmp_amt NUMBER;
45288: l_acc_rev_natural_side_code VARCHAR2(1);
45289:
45290: l_num_entries NUMBER;
45291: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45292: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45293: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45294: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45295: l_recog_line_1 NUMBER;
45288: l_acc_rev_natural_side_code VARCHAR2(1);
45289:
45290: l_num_entries NUMBER;
45291: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45292: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45293: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45294: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45295: l_recog_line_1 NUMBER;
45296: l_recog_line_2 NUMBER;
45289:
45290: l_num_entries NUMBER;
45291: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45292: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45293: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45294: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45295: l_recog_line_1 NUMBER;
45296: l_recog_line_2 NUMBER;
45297:
45290: l_num_entries NUMBER;
45291: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45292: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45293: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45294: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45295: l_recog_line_1 NUMBER;
45296: l_recog_line_2 NUMBER;
45297:
45298: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
45296: l_recog_line_2 NUMBER;
45297:
45298: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
45299: l_bflow_applied_to_amt NUMBER; -- 5132302
45300: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
45301:
45302: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
45303:
45304: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
45371: l_accrual_line_num := NULL; -- 4262811
45372: l_tmp_amt := NULL; -- 4262811
45373: --
45374:
45375: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
45376: l_balance_type_code <> 'B' THEN
45377: IF NVL(p_source_33,'
45378: ') = 'REC_TAX' AND
45379: NVL(p_source_125,'
45447: --
45448: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
45449:
45450: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
45451: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
45452:
45453: -- 4955764
45454: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
45455: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
45571: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
45572:
45573: IF xla_accounting_cache_pkg.GetValueChar
45574: (p_source_code => 'LEDGER_CATEGORY_CODE'
45575: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
45576: AND l_bflow_method_code = 'PRIOR_ENTRY'
45577: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
45578: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
45579: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
45681: p_lookup_type => 'XLA_OWNER_TYPE'
45682: ,p_lookup_code => l_component_type_code
45683: )
45684: ,p_token_4 => 'PRODUCT_NAME'
45685: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
45686: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
45687: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
45688: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
45689: ,p_ae_header_id => NULL
45682: ,p_lookup_code => l_component_type_code
45683: )
45684: ,p_token_4 => 'PRODUCT_NAME'
45685: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
45686: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
45687: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
45688: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
45689: ,p_ae_header_id => NULL
45690: );
45683: )
45684: ,p_token_4 => 'PRODUCT_NAME'
45685: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
45686: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
45687: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
45688: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
45689: ,p_ae_header_id => NULL
45690: );
45691:
45684: ,p_token_4 => 'PRODUCT_NAME'
45685: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
45686: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
45687: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
45688: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
45689: ,p_ae_header_id => NULL
45690: );
45691:
45692: IF (C_LEVEL_ERROR>= g_log_level) THEN
45715: ----------------------------------------------------------------------------------
45716: -- 4219869 Business Flow
45717: -- Update journal entry status -- Need to generate this within IF
45718: ----------------------------------------------------------------------------------
45719: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
45720: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
45721: ,p_balance_type_code => l_balance_type_code
45722: );
45723:
45802:
45803: --
45804: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
45805: --
45806: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
45807: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
45808: ELSE
45809: ---------------------------------------------------------------------------------------------------
45810: -- 4262811a Switch Sign
45827:
45828: XLA_AE_LINES_PKG.ValidateCurrentLine;
45829: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
45830:
45831: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
45832: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
45833: ,p_balance_type_code => l_balance_type_code);
45834:
45835: END IF;
45971: l_tmp_amt NUMBER;
45972: l_acc_rev_natural_side_code VARCHAR2(1);
45973:
45974: l_num_entries NUMBER;
45975: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45976: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45977: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45978: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45979: l_recog_line_1 NUMBER;
45972: l_acc_rev_natural_side_code VARCHAR2(1);
45973:
45974: l_num_entries NUMBER;
45975: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45976: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45977: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45978: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45979: l_recog_line_1 NUMBER;
45980: l_recog_line_2 NUMBER;
45973:
45974: l_num_entries NUMBER;
45975: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45976: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45977: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45978: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45979: l_recog_line_1 NUMBER;
45980: l_recog_line_2 NUMBER;
45981:
45974: l_num_entries NUMBER;
45975: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
45976: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
45977: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
45978: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
45979: l_recog_line_1 NUMBER;
45980: l_recog_line_2 NUMBER;
45981:
45982: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
45980: l_recog_line_2 NUMBER;
45981:
45982: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
45983: l_bflow_applied_to_amt NUMBER; -- 5132302
45984: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
45985:
45986: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
45987:
45988: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
46055: l_accrual_line_num := NULL; -- 4262811
46056: l_tmp_amt := NULL; -- 4262811
46057: --
46058:
46059: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
46060: l_balance_type_code <> 'B' THEN
46061: IF NVL(p_source_96,'
46062: ') <> 'CLEAR_CLEAR' AND
46063: NVL(p_source_33,'
46136: --
46137: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
46138:
46139: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
46140: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
46141:
46142: -- 4955764
46143: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
46144: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
46204: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
46205:
46206: IF xla_accounting_cache_pkg.GetValueChar
46207: (p_source_code => 'LEDGER_CATEGORY_CODE'
46208: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
46209: AND l_bflow_method_code = 'PRIOR_ENTRY'
46210: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
46211: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
46212: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
46322: p_lookup_type => 'XLA_OWNER_TYPE'
46323: ,p_lookup_code => l_component_type_code
46324: )
46325: ,p_token_4 => 'PRODUCT_NAME'
46326: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
46327: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
46328: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
46329: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
46330: ,p_ae_header_id => NULL
46323: ,p_lookup_code => l_component_type_code
46324: )
46325: ,p_token_4 => 'PRODUCT_NAME'
46326: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
46327: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
46328: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
46329: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
46330: ,p_ae_header_id => NULL
46331: );
46324: )
46325: ,p_token_4 => 'PRODUCT_NAME'
46326: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
46327: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
46328: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
46329: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
46330: ,p_ae_header_id => NULL
46331: );
46332:
46325: ,p_token_4 => 'PRODUCT_NAME'
46326: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
46327: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
46328: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
46329: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
46330: ,p_ae_header_id => NULL
46331: );
46332:
46333: IF (C_LEVEL_ERROR>= g_log_level) THEN
46356: ----------------------------------------------------------------------------------
46357: -- 4219869 Business Flow
46358: -- Update journal entry status -- Need to generate this within IF
46359: ----------------------------------------------------------------------------------
46360: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
46361: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
46362: ,p_balance_type_code => l_balance_type_code
46363: );
46364:
46443:
46444: --
46445: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
46446: --
46447: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
46448: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
46449: ELSE
46450: ---------------------------------------------------------------------------------------------------
46451: -- 4262811a Switch Sign
46468:
46469: XLA_AE_LINES_PKG.ValidateCurrentLine;
46470: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
46471:
46472: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
46473: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
46474: ,p_balance_type_code => l_balance_type_code);
46475:
46476: END IF;
46627: l_tmp_amt NUMBER;
46628: l_acc_rev_natural_side_code VARCHAR2(1);
46629:
46630: l_num_entries NUMBER;
46631: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
46632: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
46633: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
46634: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
46635: l_recog_line_1 NUMBER;
46628: l_acc_rev_natural_side_code VARCHAR2(1);
46629:
46630: l_num_entries NUMBER;
46631: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
46632: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
46633: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
46634: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
46635: l_recog_line_1 NUMBER;
46636: l_recog_line_2 NUMBER;
46629:
46630: l_num_entries NUMBER;
46631: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
46632: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
46633: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
46634: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
46635: l_recog_line_1 NUMBER;
46636: l_recog_line_2 NUMBER;
46637:
46630: l_num_entries NUMBER;
46631: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
46632: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
46633: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
46634: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
46635: l_recog_line_1 NUMBER;
46636: l_recog_line_2 NUMBER;
46637:
46638: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
46636: l_recog_line_2 NUMBER;
46637:
46638: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
46639: l_bflow_applied_to_amt NUMBER; -- 5132302
46640: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
46641:
46642: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
46643:
46644: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
46711: l_accrual_line_num := NULL; -- 4262811
46712: l_tmp_amt := NULL; -- 4262811
46713: --
46714:
46715: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
46716: l_balance_type_code <> 'B' THEN
46717: IF NVL(p_source_96,'
46718: ') <> 'CLEAR_CLEAR' AND
46719: ((NVL(p_source_33,'
46802: --
46803: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
46804:
46805: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
46806: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
46807:
46808: -- 4955764
46809: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
46810: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
46878: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
46879:
46880: IF xla_accounting_cache_pkg.GetValueChar
46881: (p_source_code => 'LEDGER_CATEGORY_CODE'
46882: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
46883: AND l_bflow_method_code = 'PRIOR_ENTRY'
46884: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
46885: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
46886: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
46996: p_lookup_type => 'XLA_OWNER_TYPE'
46997: ,p_lookup_code => l_component_type_code
46998: )
46999: ,p_token_4 => 'PRODUCT_NAME'
47000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47004: ,p_ae_header_id => NULL
46997: ,p_lookup_code => l_component_type_code
46998: )
46999: ,p_token_4 => 'PRODUCT_NAME'
47000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47004: ,p_ae_header_id => NULL
47005: );
46998: )
46999: ,p_token_4 => 'PRODUCT_NAME'
47000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47004: ,p_ae_header_id => NULL
47005: );
47006:
46999: ,p_token_4 => 'PRODUCT_NAME'
47000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47004: ,p_ae_header_id => NULL
47005: );
47006:
47007: IF (C_LEVEL_ERROR>= g_log_level) THEN
47030: ----------------------------------------------------------------------------------
47031: -- 4219869 Business Flow
47032: -- Update journal entry status -- Need to generate this within IF
47033: ----------------------------------------------------------------------------------
47034: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
47035: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
47036: ,p_balance_type_code => l_balance_type_code
47037: );
47038:
47117:
47118: --
47119: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
47120: --
47121: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
47122: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
47123: ELSE
47124: ---------------------------------------------------------------------------------------------------
47125: -- 4262811a Switch Sign
47142:
47143: XLA_AE_LINES_PKG.ValidateCurrentLine;
47144: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
47145:
47146: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
47147: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
47148: ,p_balance_type_code => l_balance_type_code);
47149:
47150: END IF;
47310: l_tmp_amt NUMBER;
47311: l_acc_rev_natural_side_code VARCHAR2(1);
47312:
47313: l_num_entries NUMBER;
47314: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
47315: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
47316: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
47317: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
47318: l_recog_line_1 NUMBER;
47311: l_acc_rev_natural_side_code VARCHAR2(1);
47312:
47313: l_num_entries NUMBER;
47314: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
47315: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
47316: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
47317: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
47318: l_recog_line_1 NUMBER;
47319: l_recog_line_2 NUMBER;
47312:
47313: l_num_entries NUMBER;
47314: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
47315: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
47316: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
47317: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
47318: l_recog_line_1 NUMBER;
47319: l_recog_line_2 NUMBER;
47320:
47313: l_num_entries NUMBER;
47314: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
47315: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
47316: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
47317: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
47318: l_recog_line_1 NUMBER;
47319: l_recog_line_2 NUMBER;
47320:
47321: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
47319: l_recog_line_2 NUMBER;
47320:
47321: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
47322: l_bflow_applied_to_amt NUMBER; -- 5132302
47323: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
47324:
47325: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
47326:
47327: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
47394: l_accrual_line_num := NULL; -- 4262811
47395: l_tmp_amt := NULL; -- 4262811
47396: --
47397:
47398: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
47399: l_balance_type_code <> 'B' THEN
47400: IF NVL(p_source_125,'
47401: ') = 'DEFERRED'
47402: THEN
47466: --
47467: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
47468:
47469: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
47470: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
47471:
47472: -- 4955764
47473: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
47474: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
47592: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
47593:
47594: IF xla_accounting_cache_pkg.GetValueChar
47595: (p_source_code => 'LEDGER_CATEGORY_CODE'
47596: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
47597: AND l_bflow_method_code = 'PRIOR_ENTRY'
47598: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
47599: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
47600: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
47692: p_lookup_type => 'XLA_OWNER_TYPE'
47693: ,p_lookup_code => l_component_type_code
47694: )
47695: ,p_token_4 => 'PRODUCT_NAME'
47696: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47697: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47698: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47699: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47700: ,p_ae_header_id => NULL
47693: ,p_lookup_code => l_component_type_code
47694: )
47695: ,p_token_4 => 'PRODUCT_NAME'
47696: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47697: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47698: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47699: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47700: ,p_ae_header_id => NULL
47701: );
47694: )
47695: ,p_token_4 => 'PRODUCT_NAME'
47696: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47697: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47698: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47699: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47700: ,p_ae_header_id => NULL
47701: );
47702:
47695: ,p_token_4 => 'PRODUCT_NAME'
47696: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
47697: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
47698: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
47699: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
47700: ,p_ae_header_id => NULL
47701: );
47702:
47703: IF (C_LEVEL_ERROR>= g_log_level) THEN
47726: ----------------------------------------------------------------------------------
47727: -- 4219869 Business Flow
47728: -- Update journal entry status -- Need to generate this within IF
47729: ----------------------------------------------------------------------------------
47730: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
47731: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
47732: ,p_balance_type_code => l_balance_type_code
47733: );
47734:
47813:
47814: --
47815: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
47816: --
47817: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
47818: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
47819: ELSE
47820: ---------------------------------------------------------------------------------------------------
47821: -- 4262811a Switch Sign
47838:
47839: XLA_AE_LINES_PKG.ValidateCurrentLine;
47840: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
47841:
47842: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
47843: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
47844: ,p_balance_type_code => l_balance_type_code);
47845:
47846: END IF;
47995: l_tmp_amt NUMBER;
47996: l_acc_rev_natural_side_code VARCHAR2(1);
47997:
47998: l_num_entries NUMBER;
47999: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48000: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48001: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48002: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48003: l_recog_line_1 NUMBER;
47996: l_acc_rev_natural_side_code VARCHAR2(1);
47997:
47998: l_num_entries NUMBER;
47999: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48000: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48001: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48002: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48003: l_recog_line_1 NUMBER;
48004: l_recog_line_2 NUMBER;
47997:
47998: l_num_entries NUMBER;
47999: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48000: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48001: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48002: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48003: l_recog_line_1 NUMBER;
48004: l_recog_line_2 NUMBER;
48005:
47998: l_num_entries NUMBER;
47999: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48000: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48001: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48002: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48003: l_recog_line_1 NUMBER;
48004: l_recog_line_2 NUMBER;
48005:
48006: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
48004: l_recog_line_2 NUMBER;
48005:
48006: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
48007: l_bflow_applied_to_amt NUMBER; -- 5132302
48008: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
48009:
48010: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
48011:
48012: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
48079: l_accrual_line_num := NULL; -- 4262811
48080: l_tmp_amt := NULL; -- 4262811
48081: --
48082:
48083: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
48084: l_balance_type_code <> 'B' THEN
48085: IF NVL(p_source_96,'
48086: ') = 'CLEAR_CLEAR' AND
48087: NVL(p_source_97,'
48171: --
48172: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
48173:
48174: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
48175: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
48176:
48177: -- 4955764
48178: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
48179: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
48247: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
48248:
48249: IF xla_accounting_cache_pkg.GetValueChar
48250: (p_source_code => 'LEDGER_CATEGORY_CODE'
48251: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
48252: AND l_bflow_method_code = 'PRIOR_ENTRY'
48253: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
48254: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
48255: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
48465: p_lookup_type => 'XLA_OWNER_TYPE'
48466: ,p_lookup_code => l_component_type_code
48467: )
48468: ,p_token_4 => 'PRODUCT_NAME'
48469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
48470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
48471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
48472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
48473: ,p_ae_header_id => NULL
48466: ,p_lookup_code => l_component_type_code
48467: )
48468: ,p_token_4 => 'PRODUCT_NAME'
48469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
48470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
48471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
48472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
48473: ,p_ae_header_id => NULL
48474: );
48467: )
48468: ,p_token_4 => 'PRODUCT_NAME'
48469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
48470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
48471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
48472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
48473: ,p_ae_header_id => NULL
48474: );
48475:
48468: ,p_token_4 => 'PRODUCT_NAME'
48469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
48470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
48471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
48472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
48473: ,p_ae_header_id => NULL
48474: );
48475:
48476: IF (C_LEVEL_ERROR>= g_log_level) THEN
48499: ----------------------------------------------------------------------------------
48500: -- 4219869 Business Flow
48501: -- Update journal entry status -- Need to generate this within IF
48502: ----------------------------------------------------------------------------------
48503: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
48504: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
48505: ,p_balance_type_code => l_balance_type_code
48506: );
48507:
48686:
48687: --
48688: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
48689: --
48690: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
48691: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
48692: ELSE
48693: ---------------------------------------------------------------------------------------------------
48694: -- 4262811a Switch Sign
48711:
48712: XLA_AE_LINES_PKG.ValidateCurrentLine;
48713: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
48714:
48715: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
48716: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
48717: ,p_balance_type_code => l_balance_type_code);
48718:
48719: END IF;
48877: l_tmp_amt NUMBER;
48878: l_acc_rev_natural_side_code VARCHAR2(1);
48879:
48880: l_num_entries NUMBER;
48881: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48882: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48883: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48884: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48885: l_recog_line_1 NUMBER;
48878: l_acc_rev_natural_side_code VARCHAR2(1);
48879:
48880: l_num_entries NUMBER;
48881: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48882: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48883: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48884: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48885: l_recog_line_1 NUMBER;
48886: l_recog_line_2 NUMBER;
48879:
48880: l_num_entries NUMBER;
48881: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48882: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48883: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48884: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48885: l_recog_line_1 NUMBER;
48886: l_recog_line_2 NUMBER;
48887:
48880: l_num_entries NUMBER;
48881: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
48882: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
48883: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
48884: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
48885: l_recog_line_1 NUMBER;
48886: l_recog_line_2 NUMBER;
48887:
48888: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
48886: l_recog_line_2 NUMBER;
48887:
48888: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
48889: l_bflow_applied_to_amt NUMBER; -- 5132302
48890: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
48891:
48892: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
48893:
48894: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
48961: l_accrual_line_num := NULL; -- 4262811
48962: l_tmp_amt := NULL; -- 4262811
48963: --
48964:
48965: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
48966: l_balance_type_code <> 'B' THEN
48967: IF NVL(p_source_96,'
48968: ') <> 'CLEAR_CLEAR' AND
48969: NVL(p_source_97,'
49039: --
49040: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
49041:
49042: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
49043: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
49044:
49045: -- 4955764
49046: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
49047: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
49115: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
49116:
49117: IF xla_accounting_cache_pkg.GetValueChar
49118: (p_source_code => 'LEDGER_CATEGORY_CODE'
49119: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
49120: AND l_bflow_method_code = 'PRIOR_ENTRY'
49121: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
49122: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
49123: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
49333: p_lookup_type => 'XLA_OWNER_TYPE'
49334: ,p_lookup_code => l_component_type_code
49335: )
49336: ,p_token_4 => 'PRODUCT_NAME'
49337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
49338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
49339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
49340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
49341: ,p_ae_header_id => NULL
49334: ,p_lookup_code => l_component_type_code
49335: )
49336: ,p_token_4 => 'PRODUCT_NAME'
49337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
49338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
49339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
49340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
49341: ,p_ae_header_id => NULL
49342: );
49335: )
49336: ,p_token_4 => 'PRODUCT_NAME'
49337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
49338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
49339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
49340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
49341: ,p_ae_header_id => NULL
49342: );
49343:
49336: ,p_token_4 => 'PRODUCT_NAME'
49337: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
49338: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
49339: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
49340: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
49341: ,p_ae_header_id => NULL
49342: );
49343:
49344: IF (C_LEVEL_ERROR>= g_log_level) THEN
49367: ----------------------------------------------------------------------------------
49368: -- 4219869 Business Flow
49369: -- Update journal entry status -- Need to generate this within IF
49370: ----------------------------------------------------------------------------------
49371: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
49372: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
49373: ,p_balance_type_code => l_balance_type_code
49374: );
49375:
49554:
49555: --
49556: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
49557: --
49558: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
49559: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
49560: ELSE
49561: ---------------------------------------------------------------------------------------------------
49562: -- 4262811a Switch Sign
49579:
49580: XLA_AE_LINES_PKG.ValidateCurrentLine;
49581: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
49582:
49583: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
49584: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
49585: ,p_balance_type_code => l_balance_type_code);
49586:
49587: END IF;
49741: l_tmp_amt NUMBER;
49742: l_acc_rev_natural_side_code VARCHAR2(1);
49743:
49744: l_num_entries NUMBER;
49745: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
49746: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
49747: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
49748: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
49749: l_recog_line_1 NUMBER;
49742: l_acc_rev_natural_side_code VARCHAR2(1);
49743:
49744: l_num_entries NUMBER;
49745: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
49746: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
49747: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
49748: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
49749: l_recog_line_1 NUMBER;
49750: l_recog_line_2 NUMBER;
49743:
49744: l_num_entries NUMBER;
49745: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
49746: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
49747: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
49748: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
49749: l_recog_line_1 NUMBER;
49750: l_recog_line_2 NUMBER;
49751:
49744: l_num_entries NUMBER;
49745: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
49746: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
49747: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
49748: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
49749: l_recog_line_1 NUMBER;
49750: l_recog_line_2 NUMBER;
49751:
49752: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
49750: l_recog_line_2 NUMBER;
49751:
49752: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
49753: l_bflow_applied_to_amt NUMBER; -- 5132302
49754: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
49755:
49756: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
49757:
49758: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
49825: l_accrual_line_num := NULL; -- 4262811
49826: l_tmp_amt := NULL; -- 4262811
49827: --
49828:
49829: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
49830: l_balance_type_code <> 'B' THEN
49831: IF NVL(p_source_96,'
49832: ') <> 'CLEAR_CLEAR' AND
49833: NVL(p_source_97,'
49901: --
49902: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
49903:
49904: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
49905: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
49906:
49907: -- 4955764
49908: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
49909: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
49975: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
49976:
49977: IF xla_accounting_cache_pkg.GetValueChar
49978: (p_source_code => 'LEDGER_CATEGORY_CODE'
49979: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
49980: AND l_bflow_method_code = 'PRIOR_ENTRY'
49981: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
49982: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
49983: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
50193: p_lookup_type => 'XLA_OWNER_TYPE'
50194: ,p_lookup_code => l_component_type_code
50195: )
50196: ,p_token_4 => 'PRODUCT_NAME'
50197: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
50198: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
50199: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
50200: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
50201: ,p_ae_header_id => NULL
50194: ,p_lookup_code => l_component_type_code
50195: )
50196: ,p_token_4 => 'PRODUCT_NAME'
50197: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
50198: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
50199: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
50200: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
50201: ,p_ae_header_id => NULL
50202: );
50195: )
50196: ,p_token_4 => 'PRODUCT_NAME'
50197: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
50198: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
50199: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
50200: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
50201: ,p_ae_header_id => NULL
50202: );
50203:
50196: ,p_token_4 => 'PRODUCT_NAME'
50197: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
50198: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
50199: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
50200: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
50201: ,p_ae_header_id => NULL
50202: );
50203:
50204: IF (C_LEVEL_ERROR>= g_log_level) THEN
50227: ----------------------------------------------------------------------------------
50228: -- 4219869 Business Flow
50229: -- Update journal entry status -- Need to generate this within IF
50230: ----------------------------------------------------------------------------------
50231: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
50232: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
50233: ,p_balance_type_code => l_balance_type_code
50234: );
50235:
50414:
50415: --
50416: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
50417: --
50418: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
50419: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
50420: ELSE
50421: ---------------------------------------------------------------------------------------------------
50422: -- 4262811a Switch Sign
50439:
50440: XLA_AE_LINES_PKG.ValidateCurrentLine;
50441: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
50442:
50443: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
50444: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
50445: ,p_balance_type_code => l_balance_type_code);
50446:
50447: END IF;
50625: l_tmp_amt NUMBER;
50626: l_acc_rev_natural_side_code VARCHAR2(1);
50627:
50628: l_num_entries NUMBER;
50629: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
50630: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
50631: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
50632: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
50633: l_recog_line_1 NUMBER;
50626: l_acc_rev_natural_side_code VARCHAR2(1);
50627:
50628: l_num_entries NUMBER;
50629: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
50630: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
50631: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
50632: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
50633: l_recog_line_1 NUMBER;
50634: l_recog_line_2 NUMBER;
50627:
50628: l_num_entries NUMBER;
50629: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
50630: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
50631: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
50632: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
50633: l_recog_line_1 NUMBER;
50634: l_recog_line_2 NUMBER;
50635:
50628: l_num_entries NUMBER;
50629: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
50630: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
50631: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
50632: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
50633: l_recog_line_1 NUMBER;
50634: l_recog_line_2 NUMBER;
50635:
50636: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
50634: l_recog_line_2 NUMBER;
50635:
50636: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
50637: l_bflow_applied_to_amt NUMBER; -- 5132302
50638: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
50639:
50640: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
50641:
50642: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
50708: l_acc_rev_flag := NULL; -- 4262811
50709: l_accrual_line_num := NULL; -- 4262811
50710: l_tmp_amt := NULL; -- 4262811
50711: --
50712: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
50713: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
50714: return;
50715: END IF;
50716:
50709: l_accrual_line_num := NULL; -- 4262811
50710: l_tmp_amt := NULL; -- 4262811
50711: --
50712: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
50713: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
50714: return;
50715: END IF;
50716:
50717: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
50713: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
50714: return;
50715: END IF;
50716:
50717: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
50718: l_balance_type_code <> 'B' THEN
50719: IF NVL(p_source_33,'
50720: ') = 'ERV' AND
50721: NVL(p_source_95,'
50787: --
50788: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
50789:
50790: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
50791: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
50792:
50793: -- 4955764
50794: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
50795: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
50911: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
50912:
50913: IF xla_accounting_cache_pkg.GetValueChar
50914: (p_source_code => 'LEDGER_CATEGORY_CODE'
50915: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
50916: AND l_bflow_method_code = 'PRIOR_ENTRY'
50917: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
50918: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
50919: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
51122: p_lookup_type => 'XLA_OWNER_TYPE'
51123: ,p_lookup_code => l_component_type_code
51124: )
51125: ,p_token_4 => 'PRODUCT_NAME'
51126: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
51127: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
51128: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
51129: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
51130: ,p_ae_header_id => NULL
51123: ,p_lookup_code => l_component_type_code
51124: )
51125: ,p_token_4 => 'PRODUCT_NAME'
51126: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
51127: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
51128: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
51129: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
51130: ,p_ae_header_id => NULL
51131: );
51124: )
51125: ,p_token_4 => 'PRODUCT_NAME'
51126: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
51127: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
51128: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
51129: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
51130: ,p_ae_header_id => NULL
51131: );
51132:
51125: ,p_token_4 => 'PRODUCT_NAME'
51126: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
51127: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
51128: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
51129: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
51130: ,p_ae_header_id => NULL
51131: );
51132:
51133: IF (C_LEVEL_ERROR>= g_log_level) THEN
51156: ----------------------------------------------------------------------------------
51157: -- 4219869 Business Flow
51158: -- Update journal entry status -- Need to generate this within IF
51159: ----------------------------------------------------------------------------------
51160: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
51161: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
51162: ,p_balance_type_code => l_balance_type_code
51163: );
51164:
51344:
51345: --
51346: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
51347: --
51348: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
51349: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
51350: ELSE
51351: ---------------------------------------------------------------------------------------------------
51352: -- 4262811a Switch Sign
51369:
51370: XLA_AE_LINES_PKG.ValidateCurrentLine;
51371: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
51372:
51373: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
51374: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
51375: ,p_balance_type_code => l_balance_type_code);
51376:
51377: END IF;
51553: l_tmp_amt NUMBER;
51554: l_acc_rev_natural_side_code VARCHAR2(1);
51555:
51556: l_num_entries NUMBER;
51557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
51558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
51559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
51560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
51561: l_recog_line_1 NUMBER;
51554: l_acc_rev_natural_side_code VARCHAR2(1);
51555:
51556: l_num_entries NUMBER;
51557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
51558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
51559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
51560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
51561: l_recog_line_1 NUMBER;
51562: l_recog_line_2 NUMBER;
51555:
51556: l_num_entries NUMBER;
51557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
51558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
51559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
51560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
51561: l_recog_line_1 NUMBER;
51562: l_recog_line_2 NUMBER;
51563:
51556: l_num_entries NUMBER;
51557: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
51558: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
51559: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
51560: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
51561: l_recog_line_1 NUMBER;
51562: l_recog_line_2 NUMBER;
51563:
51564: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
51562: l_recog_line_2 NUMBER;
51563:
51564: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
51565: l_bflow_applied_to_amt NUMBER; -- 5132302
51566: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
51567:
51568: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
51569:
51570: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
51636: l_acc_rev_flag := NULL; -- 4262811
51637: l_accrual_line_num := NULL; -- 4262811
51638: l_tmp_amt := NULL; -- 4262811
51639: --
51640: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
51641: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
51642: return;
51643: END IF;
51644:
51637: l_accrual_line_num := NULL; -- 4262811
51638: l_tmp_amt := NULL; -- 4262811
51639: --
51640: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
51641: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
51642: return;
51643: END IF;
51644:
51645: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
51641: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
51642: return;
51643: END IF;
51644:
51645: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
51646: l_balance_type_code <> 'B' THEN
51647: IF NVL(p_source_33,'
51648: ') = 'ERV' AND
51649: NVL(p_source_95,'
51715: --
51716: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
51717:
51718: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
51719: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
51720:
51721: -- 4955764
51722: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
51723: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
51837: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
51838:
51839: IF xla_accounting_cache_pkg.GetValueChar
51840: (p_source_code => 'LEDGER_CATEGORY_CODE'
51841: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
51842: AND l_bflow_method_code = 'PRIOR_ENTRY'
51843: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
51844: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
51845: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
52048: p_lookup_type => 'XLA_OWNER_TYPE'
52049: ,p_lookup_code => l_component_type_code
52050: )
52051: ,p_token_4 => 'PRODUCT_NAME'
52052: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52053: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52054: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52055: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52056: ,p_ae_header_id => NULL
52049: ,p_lookup_code => l_component_type_code
52050: )
52051: ,p_token_4 => 'PRODUCT_NAME'
52052: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52053: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52054: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52055: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52056: ,p_ae_header_id => NULL
52057: );
52050: )
52051: ,p_token_4 => 'PRODUCT_NAME'
52052: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52053: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52054: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52055: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52056: ,p_ae_header_id => NULL
52057: );
52058:
52051: ,p_token_4 => 'PRODUCT_NAME'
52052: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52053: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52054: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52055: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52056: ,p_ae_header_id => NULL
52057: );
52058:
52059: IF (C_LEVEL_ERROR>= g_log_level) THEN
52082: ----------------------------------------------------------------------------------
52083: -- 4219869 Business Flow
52084: -- Update journal entry status -- Need to generate this within IF
52085: ----------------------------------------------------------------------------------
52086: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
52087: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
52088: ,p_balance_type_code => l_balance_type_code
52089: );
52090:
52270:
52271: --
52272: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
52273: --
52274: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
52275: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
52276: ELSE
52277: ---------------------------------------------------------------------------------------------------
52278: -- 4262811a Switch Sign
52295:
52296: XLA_AE_LINES_PKG.ValidateCurrentLine;
52297: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
52298:
52299: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
52300: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
52301: ,p_balance_type_code => l_balance_type_code);
52302:
52303: END IF;
52481: l_tmp_amt NUMBER;
52482: l_acc_rev_natural_side_code VARCHAR2(1);
52483:
52484: l_num_entries NUMBER;
52485: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
52486: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
52487: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
52488: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
52489: l_recog_line_1 NUMBER;
52482: l_acc_rev_natural_side_code VARCHAR2(1);
52483:
52484: l_num_entries NUMBER;
52485: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
52486: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
52487: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
52488: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
52489: l_recog_line_1 NUMBER;
52490: l_recog_line_2 NUMBER;
52483:
52484: l_num_entries NUMBER;
52485: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
52486: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
52487: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
52488: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
52489: l_recog_line_1 NUMBER;
52490: l_recog_line_2 NUMBER;
52491:
52484: l_num_entries NUMBER;
52485: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
52486: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
52487: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
52488: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
52489: l_recog_line_1 NUMBER;
52490: l_recog_line_2 NUMBER;
52491:
52492: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
52490: l_recog_line_2 NUMBER;
52491:
52492: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
52493: l_bflow_applied_to_amt NUMBER; -- 5132302
52494: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
52495:
52496: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
52497:
52498: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
52564: l_acc_rev_flag := NULL; -- 4262811
52565: l_accrual_line_num := NULL; -- 4262811
52566: l_tmp_amt := NULL; -- 4262811
52567: --
52568: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
52569: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
52570: return;
52571: END IF;
52572:
52565: l_accrual_line_num := NULL; -- 4262811
52566: l_tmp_amt := NULL; -- 4262811
52567: --
52568: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
52569: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
52570: return;
52571: END IF;
52572:
52573: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
52569: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
52570: return;
52571: END IF;
52572:
52573: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
52574: l_balance_type_code <> 'B' THEN
52575: IF NVL(p_source_33,'
52576: ') = 'ERV' AND
52577: NVL(p_source_95,'
52643: --
52644: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
52645:
52646: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
52647: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
52648:
52649: -- 4955764
52650: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
52651: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
52769: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
52770:
52771: IF xla_accounting_cache_pkg.GetValueChar
52772: (p_source_code => 'LEDGER_CATEGORY_CODE'
52773: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
52774: AND l_bflow_method_code = 'PRIOR_ENTRY'
52775: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
52776: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
52777: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
52980: p_lookup_type => 'XLA_OWNER_TYPE'
52981: ,p_lookup_code => l_component_type_code
52982: )
52983: ,p_token_4 => 'PRODUCT_NAME'
52984: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52985: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52986: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52987: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52988: ,p_ae_header_id => NULL
52981: ,p_lookup_code => l_component_type_code
52982: )
52983: ,p_token_4 => 'PRODUCT_NAME'
52984: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52985: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52986: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52987: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52988: ,p_ae_header_id => NULL
52989: );
52982: )
52983: ,p_token_4 => 'PRODUCT_NAME'
52984: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52985: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52986: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52987: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52988: ,p_ae_header_id => NULL
52989: );
52990:
52983: ,p_token_4 => 'PRODUCT_NAME'
52984: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
52985: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
52986: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
52987: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
52988: ,p_ae_header_id => NULL
52989: );
52990:
52991: IF (C_LEVEL_ERROR>= g_log_level) THEN
53014: ----------------------------------------------------------------------------------
53015: -- 4219869 Business Flow
53016: -- Update journal entry status -- Need to generate this within IF
53017: ----------------------------------------------------------------------------------
53018: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
53019: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
53020: ,p_balance_type_code => l_balance_type_code
53021: );
53022:
53202:
53203: --
53204: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
53205: --
53206: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
53207: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
53208: ELSE
53209: ---------------------------------------------------------------------------------------------------
53210: -- 4262811a Switch Sign
53227:
53228: XLA_AE_LINES_PKG.ValidateCurrentLine;
53229: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
53230:
53231: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
53232: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
53233: ,p_balance_type_code => l_balance_type_code);
53234:
53235: END IF;
53413: l_tmp_amt NUMBER;
53414: l_acc_rev_natural_side_code VARCHAR2(1);
53415:
53416: l_num_entries NUMBER;
53417: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
53418: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
53419: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
53420: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
53421: l_recog_line_1 NUMBER;
53414: l_acc_rev_natural_side_code VARCHAR2(1);
53415:
53416: l_num_entries NUMBER;
53417: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
53418: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
53419: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
53420: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
53421: l_recog_line_1 NUMBER;
53422: l_recog_line_2 NUMBER;
53415:
53416: l_num_entries NUMBER;
53417: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
53418: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
53419: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
53420: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
53421: l_recog_line_1 NUMBER;
53422: l_recog_line_2 NUMBER;
53423:
53416: l_num_entries NUMBER;
53417: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
53418: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
53419: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
53420: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
53421: l_recog_line_1 NUMBER;
53422: l_recog_line_2 NUMBER;
53423:
53424: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
53422: l_recog_line_2 NUMBER;
53423:
53424: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
53425: l_bflow_applied_to_amt NUMBER; -- 5132302
53426: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
53427:
53428: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
53429:
53430: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
53496: l_acc_rev_flag := NULL; -- 4262811
53497: l_accrual_line_num := NULL; -- 4262811
53498: l_tmp_amt := NULL; -- 4262811
53499: --
53500: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
53501: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
53502: return;
53503: END IF;
53504:
53497: l_accrual_line_num := NULL; -- 4262811
53498: l_tmp_amt := NULL; -- 4262811
53499: --
53500: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
53501: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
53502: return;
53503: END IF;
53504:
53505: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
53501: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
53502: return;
53503: END IF;
53504:
53505: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
53506: l_balance_type_code <> 'B' THEN
53507: IF NVL(p_source_33,'
53508: ') = 'ERV' AND
53509: NVL(p_source_95,'
53575: --
53576: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
53577:
53578: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
53579: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
53580:
53581: -- 4955764
53582: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
53583: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
53699: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
53700:
53701: IF xla_accounting_cache_pkg.GetValueChar
53702: (p_source_code => 'LEDGER_CATEGORY_CODE'
53703: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
53704: AND l_bflow_method_code = 'PRIOR_ENTRY'
53705: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
53706: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
53707: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
53910: p_lookup_type => 'XLA_OWNER_TYPE'
53911: ,p_lookup_code => l_component_type_code
53912: )
53913: ,p_token_4 => 'PRODUCT_NAME'
53914: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
53915: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
53916: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
53917: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
53918: ,p_ae_header_id => NULL
53911: ,p_lookup_code => l_component_type_code
53912: )
53913: ,p_token_4 => 'PRODUCT_NAME'
53914: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
53915: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
53916: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
53917: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
53918: ,p_ae_header_id => NULL
53919: );
53912: )
53913: ,p_token_4 => 'PRODUCT_NAME'
53914: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
53915: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
53916: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
53917: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
53918: ,p_ae_header_id => NULL
53919: );
53920:
53913: ,p_token_4 => 'PRODUCT_NAME'
53914: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
53915: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
53916: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
53917: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
53918: ,p_ae_header_id => NULL
53919: );
53920:
53921: IF (C_LEVEL_ERROR>= g_log_level) THEN
53944: ----------------------------------------------------------------------------------
53945: -- 4219869 Business Flow
53946: -- Update journal entry status -- Need to generate this within IF
53947: ----------------------------------------------------------------------------------
53948: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
53949: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
53950: ,p_balance_type_code => l_balance_type_code
53951: );
53952:
54132:
54133: --
54134: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
54135: --
54136: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
54137: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
54138: ELSE
54139: ---------------------------------------------------------------------------------------------------
54140: -- 4262811a Switch Sign
54157:
54158: XLA_AE_LINES_PKG.ValidateCurrentLine;
54159: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
54160:
54161: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
54162: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
54163: ,p_balance_type_code => l_balance_type_code);
54164:
54165: END IF;
54331: l_tmp_amt NUMBER;
54332: l_acc_rev_natural_side_code VARCHAR2(1);
54333:
54334: l_num_entries NUMBER;
54335: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
54336: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
54337: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
54338: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
54339: l_recog_line_1 NUMBER;
54332: l_acc_rev_natural_side_code VARCHAR2(1);
54333:
54334: l_num_entries NUMBER;
54335: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
54336: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
54337: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
54338: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
54339: l_recog_line_1 NUMBER;
54340: l_recog_line_2 NUMBER;
54333:
54334: l_num_entries NUMBER;
54335: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
54336: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
54337: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
54338: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
54339: l_recog_line_1 NUMBER;
54340: l_recog_line_2 NUMBER;
54341:
54334: l_num_entries NUMBER;
54335: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
54336: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
54337: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
54338: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
54339: l_recog_line_1 NUMBER;
54340: l_recog_line_2 NUMBER;
54341:
54342: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
54340: l_recog_line_2 NUMBER;
54341:
54342: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
54343: l_bflow_applied_to_amt NUMBER; -- 5132302
54344: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
54345:
54346: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
54347:
54348: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
54415: l_accrual_line_num := NULL; -- 4262811
54416: l_tmp_amt := NULL; -- 4262811
54417: --
54418:
54419: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
54420: l_balance_type_code <> 'B' THEN
54421: IF NVL(p_source_143,'
54422: ') = 'FINAL APPLICATION ROUNDING'
54423: THEN
54487: --
54488: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
54489:
54490: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
54491: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
54492:
54493: -- 4955764
54494: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
54495: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
54613: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
54614:
54615: IF xla_accounting_cache_pkg.GetValueChar
54616: (p_source_code => 'LEDGER_CATEGORY_CODE'
54617: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
54618: AND l_bflow_method_code = 'PRIOR_ENTRY'
54619: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
54620: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
54621: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
54735: p_lookup_type => 'XLA_OWNER_TYPE'
54736: ,p_lookup_code => l_component_type_code
54737: )
54738: ,p_token_4 => 'PRODUCT_NAME'
54739: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
54740: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
54741: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
54742: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
54743: ,p_ae_header_id => NULL
54736: ,p_lookup_code => l_component_type_code
54737: )
54738: ,p_token_4 => 'PRODUCT_NAME'
54739: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
54740: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
54741: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
54742: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
54743: ,p_ae_header_id => NULL
54744: );
54737: )
54738: ,p_token_4 => 'PRODUCT_NAME'
54739: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
54740: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
54741: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
54742: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
54743: ,p_ae_header_id => NULL
54744: );
54745:
54738: ,p_token_4 => 'PRODUCT_NAME'
54739: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
54740: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
54741: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
54742: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
54743: ,p_ae_header_id => NULL
54744: );
54745:
54746: IF (C_LEVEL_ERROR>= g_log_level) THEN
54769: ----------------------------------------------------------------------------------
54770: -- 4219869 Business Flow
54771: -- Update journal entry status -- Need to generate this within IF
54772: ----------------------------------------------------------------------------------
54773: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
54774: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
54775: ,p_balance_type_code => l_balance_type_code
54776: );
54777:
54859:
54860: --
54861: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
54862: --
54863: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
54864: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
54865: ELSE
54866: ---------------------------------------------------------------------------------------------------
54867: -- 4262811a Switch Sign
54884:
54885: XLA_AE_LINES_PKG.ValidateCurrentLine;
54886: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
54887:
54888: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
54889: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
54890: ,p_balance_type_code => l_balance_type_code);
54891:
54892: END IF;
55029: l_tmp_amt NUMBER;
55030: l_acc_rev_natural_side_code VARCHAR2(1);
55031:
55032: l_num_entries NUMBER;
55033: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55034: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55035: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55036: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55037: l_recog_line_1 NUMBER;
55030: l_acc_rev_natural_side_code VARCHAR2(1);
55031:
55032: l_num_entries NUMBER;
55033: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55034: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55035: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55036: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55037: l_recog_line_1 NUMBER;
55038: l_recog_line_2 NUMBER;
55031:
55032: l_num_entries NUMBER;
55033: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55034: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55035: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55036: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55037: l_recog_line_1 NUMBER;
55038: l_recog_line_2 NUMBER;
55039:
55032: l_num_entries NUMBER;
55033: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55034: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55035: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55036: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55037: l_recog_line_1 NUMBER;
55038: l_recog_line_2 NUMBER;
55039:
55040: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
55038: l_recog_line_2 NUMBER;
55039:
55040: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
55041: l_bflow_applied_to_amt NUMBER; -- 5132302
55042: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
55043:
55044: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
55045:
55046: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
55113: l_accrual_line_num := NULL; -- 4262811
55114: l_tmp_amt := NULL; -- 4262811
55115: --
55116:
55117: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
55118: l_balance_type_code <> 'B' THEN
55119: IF NVL(p_source_96,'
55120: ') = 'CLEAR_CLEAR' AND
55121: NVL(p_source_97,'
55187: --
55188: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
55189:
55190: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
55191: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
55192:
55193: -- 4955764
55194: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
55195: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
55263: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
55264:
55265: IF xla_accounting_cache_pkg.GetValueChar
55266: (p_source_code => 'LEDGER_CATEGORY_CODE'
55267: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
55268: AND l_bflow_method_code = 'PRIOR_ENTRY'
55269: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
55270: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
55271: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
55384: p_lookup_type => 'XLA_OWNER_TYPE'
55385: ,p_lookup_code => l_component_type_code
55386: )
55387: ,p_token_4 => 'PRODUCT_NAME'
55388: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
55389: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
55390: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
55391: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
55392: ,p_ae_header_id => NULL
55385: ,p_lookup_code => l_component_type_code
55386: )
55387: ,p_token_4 => 'PRODUCT_NAME'
55388: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
55389: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
55390: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
55391: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
55392: ,p_ae_header_id => NULL
55393: );
55386: )
55387: ,p_token_4 => 'PRODUCT_NAME'
55388: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
55389: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
55390: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
55391: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
55392: ,p_ae_header_id => NULL
55393: );
55394:
55387: ,p_token_4 => 'PRODUCT_NAME'
55388: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
55389: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
55390: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
55391: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
55392: ,p_ae_header_id => NULL
55393: );
55394:
55395: IF (C_LEVEL_ERROR>= g_log_level) THEN
55418: ----------------------------------------------------------------------------------
55419: -- 4219869 Business Flow
55420: -- Update journal entry status -- Need to generate this within IF
55421: ----------------------------------------------------------------------------------
55422: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
55423: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
55424: ,p_balance_type_code => l_balance_type_code
55425: );
55426:
55508:
55509: --
55510: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
55511: --
55512: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
55513: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
55514: ELSE
55515: ---------------------------------------------------------------------------------------------------
55516: -- 4262811a Switch Sign
55533:
55534: XLA_AE_LINES_PKG.ValidateCurrentLine;
55535: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
55536:
55537: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
55538: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
55539: ,p_balance_type_code => l_balance_type_code);
55540:
55541: END IF;
55687: l_tmp_amt NUMBER;
55688: l_acc_rev_natural_side_code VARCHAR2(1);
55689:
55690: l_num_entries NUMBER;
55691: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55692: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55693: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55694: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55695: l_recog_line_1 NUMBER;
55688: l_acc_rev_natural_side_code VARCHAR2(1);
55689:
55690: l_num_entries NUMBER;
55691: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55692: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55693: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55694: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55695: l_recog_line_1 NUMBER;
55696: l_recog_line_2 NUMBER;
55689:
55690: l_num_entries NUMBER;
55691: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55692: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55693: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55694: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55695: l_recog_line_1 NUMBER;
55696: l_recog_line_2 NUMBER;
55697:
55690: l_num_entries NUMBER;
55691: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
55692: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
55693: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
55694: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
55695: l_recog_line_1 NUMBER;
55696: l_recog_line_2 NUMBER;
55697:
55698: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
55696: l_recog_line_2 NUMBER;
55697:
55698: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
55699: l_bflow_applied_to_amt NUMBER; -- 5132302
55700: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
55701:
55702: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
55703:
55704: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
55771: l_accrual_line_num := NULL; -- 4262811
55772: l_tmp_amt := NULL; -- 4262811
55773: --
55774:
55775: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
55776: l_balance_type_code <> 'B' THEN
55777: IF NVL(p_source_96,'
55778: ') <> 'CLEAR_CLEAR' AND
55779: NVL(p_source_97,'
55849: --
55850: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
55851:
55852: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
55853: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
55854:
55855: -- 4955764
55856: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
55857: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
55925: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
55926:
55927: IF xla_accounting_cache_pkg.GetValueChar
55928: (p_source_code => 'LEDGER_CATEGORY_CODE'
55929: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
55930: AND l_bflow_method_code = 'PRIOR_ENTRY'
55931: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
55932: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
55933: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
56046: p_lookup_type => 'XLA_OWNER_TYPE'
56047: ,p_lookup_code => l_component_type_code
56048: )
56049: ,p_token_4 => 'PRODUCT_NAME'
56050: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56051: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56052: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56053: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56054: ,p_ae_header_id => NULL
56047: ,p_lookup_code => l_component_type_code
56048: )
56049: ,p_token_4 => 'PRODUCT_NAME'
56050: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56051: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56052: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56053: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56054: ,p_ae_header_id => NULL
56055: );
56048: )
56049: ,p_token_4 => 'PRODUCT_NAME'
56050: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56051: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56052: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56053: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56054: ,p_ae_header_id => NULL
56055: );
56056:
56049: ,p_token_4 => 'PRODUCT_NAME'
56050: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56051: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56052: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56053: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56054: ,p_ae_header_id => NULL
56055: );
56056:
56057: IF (C_LEVEL_ERROR>= g_log_level) THEN
56080: ----------------------------------------------------------------------------------
56081: -- 4219869 Business Flow
56082: -- Update journal entry status -- Need to generate this within IF
56083: ----------------------------------------------------------------------------------
56084: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
56085: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
56086: ,p_balance_type_code => l_balance_type_code
56087: );
56088:
56170:
56171: --
56172: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
56173: --
56174: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
56175: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
56176: ELSE
56177: ---------------------------------------------------------------------------------------------------
56178: -- 4262811a Switch Sign
56195:
56196: XLA_AE_LINES_PKG.ValidateCurrentLine;
56197: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
56198:
56199: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
56200: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
56201: ,p_balance_type_code => l_balance_type_code);
56202:
56203: END IF;
56345: l_tmp_amt NUMBER;
56346: l_acc_rev_natural_side_code VARCHAR2(1);
56347:
56348: l_num_entries NUMBER;
56349: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
56350: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
56351: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
56352: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
56353: l_recog_line_1 NUMBER;
56346: l_acc_rev_natural_side_code VARCHAR2(1);
56347:
56348: l_num_entries NUMBER;
56349: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
56350: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
56351: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
56352: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
56353: l_recog_line_1 NUMBER;
56354: l_recog_line_2 NUMBER;
56347:
56348: l_num_entries NUMBER;
56349: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
56350: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
56351: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
56352: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
56353: l_recog_line_1 NUMBER;
56354: l_recog_line_2 NUMBER;
56355:
56348: l_num_entries NUMBER;
56349: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
56350: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
56351: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
56352: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
56353: l_recog_line_1 NUMBER;
56354: l_recog_line_2 NUMBER;
56355:
56356: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
56354: l_recog_line_2 NUMBER;
56355:
56356: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
56357: l_bflow_applied_to_amt NUMBER; -- 5132302
56358: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
56359:
56360: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
56361:
56362: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
56429: l_accrual_line_num := NULL; -- 4262811
56430: l_tmp_amt := NULL; -- 4262811
56431: --
56432:
56433: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
56434: l_balance_type_code <> 'B' THEN
56435: IF NVL(p_source_96,'
56436: ') <> 'CLEAR_CLEAR' AND
56437: NVL(p_source_97,'
56505: --
56506: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
56507:
56508: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
56509: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
56510:
56511: -- 4955764
56512: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
56513: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
56579: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
56580:
56581: IF xla_accounting_cache_pkg.GetValueChar
56582: (p_source_code => 'LEDGER_CATEGORY_CODE'
56583: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
56584: AND l_bflow_method_code = 'PRIOR_ENTRY'
56585: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
56586: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
56587: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
56700: p_lookup_type => 'XLA_OWNER_TYPE'
56701: ,p_lookup_code => l_component_type_code
56702: )
56703: ,p_token_4 => 'PRODUCT_NAME'
56704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56708: ,p_ae_header_id => NULL
56701: ,p_lookup_code => l_component_type_code
56702: )
56703: ,p_token_4 => 'PRODUCT_NAME'
56704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56708: ,p_ae_header_id => NULL
56709: );
56702: )
56703: ,p_token_4 => 'PRODUCT_NAME'
56704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56708: ,p_ae_header_id => NULL
56709: );
56710:
56703: ,p_token_4 => 'PRODUCT_NAME'
56704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
56705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
56706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
56707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
56708: ,p_ae_header_id => NULL
56709: );
56710:
56711: IF (C_LEVEL_ERROR>= g_log_level) THEN
56734: ----------------------------------------------------------------------------------
56735: -- 4219869 Business Flow
56736: -- Update journal entry status -- Need to generate this within IF
56737: ----------------------------------------------------------------------------------
56738: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
56739: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
56740: ,p_balance_type_code => l_balance_type_code
56741: );
56742:
56824:
56825: --
56826: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
56827: --
56828: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
56829: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
56830: ELSE
56831: ---------------------------------------------------------------------------------------------------
56832: -- 4262811a Switch Sign
56849:
56850: XLA_AE_LINES_PKG.ValidateCurrentLine;
56851: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
56852:
56853: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
56854: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
56855: ,p_balance_type_code => l_balance_type_code);
56856:
56857: END IF;
57021: l_tmp_amt NUMBER;
57022: l_acc_rev_natural_side_code VARCHAR2(1);
57023:
57024: l_num_entries NUMBER;
57025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57029: l_recog_line_1 NUMBER;
57022: l_acc_rev_natural_side_code VARCHAR2(1);
57023:
57024: l_num_entries NUMBER;
57025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57029: l_recog_line_1 NUMBER;
57030: l_recog_line_2 NUMBER;
57023:
57024: l_num_entries NUMBER;
57025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57029: l_recog_line_1 NUMBER;
57030: l_recog_line_2 NUMBER;
57031:
57024: l_num_entries NUMBER;
57025: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57026: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57027: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57028: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57029: l_recog_line_1 NUMBER;
57030: l_recog_line_2 NUMBER;
57031:
57032: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
57030: l_recog_line_2 NUMBER;
57031:
57032: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
57033: l_bflow_applied_to_amt NUMBER; -- 5132302
57034: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
57035:
57036: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
57037:
57038: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
57105: l_accrual_line_num := NULL; -- 4262811
57106: l_tmp_amt := NULL; -- 4262811
57107: --
57108:
57109: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
57110: l_balance_type_code <> 'B' THEN
57111: IF NVL(p_source_143,'
57112: ') = 'FINAL PAYMENT ROUNDING'
57113: THEN
57177: --
57178: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
57179:
57180: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
57181: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
57182:
57183: -- 4955764
57184: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
57185: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
57303: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
57304:
57305: IF xla_accounting_cache_pkg.GetValueChar
57306: (p_source_code => 'LEDGER_CATEGORY_CODE'
57307: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
57308: AND l_bflow_method_code = 'PRIOR_ENTRY'
57309: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
57310: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
57311: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
57406: p_lookup_type => 'XLA_OWNER_TYPE'
57407: ,p_lookup_code => l_component_type_code
57408: )
57409: ,p_token_4 => 'PRODUCT_NAME'
57410: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
57411: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
57412: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
57413: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
57414: ,p_ae_header_id => NULL
57407: ,p_lookup_code => l_component_type_code
57408: )
57409: ,p_token_4 => 'PRODUCT_NAME'
57410: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
57411: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
57412: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
57413: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
57414: ,p_ae_header_id => NULL
57415: );
57408: )
57409: ,p_token_4 => 'PRODUCT_NAME'
57410: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
57411: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
57412: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
57413: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
57414: ,p_ae_header_id => NULL
57415: );
57416:
57409: ,p_token_4 => 'PRODUCT_NAME'
57410: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
57411: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
57412: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
57413: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
57414: ,p_ae_header_id => NULL
57415: );
57416:
57417: IF (C_LEVEL_ERROR>= g_log_level) THEN
57440: ----------------------------------------------------------------------------------
57441: -- 4219869 Business Flow
57442: -- Update journal entry status -- Need to generate this within IF
57443: ----------------------------------------------------------------------------------
57444: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
57445: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
57446: ,p_balance_type_code => l_balance_type_code
57447: );
57448:
57530:
57531: --
57532: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
57533: --
57534: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
57535: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
57536: ELSE
57537: ---------------------------------------------------------------------------------------------------
57538: -- 4262811a Switch Sign
57555:
57556: XLA_AE_LINES_PKG.ValidateCurrentLine;
57557: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
57558:
57559: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
57560: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
57561: ,p_balance_type_code => l_balance_type_code);
57562:
57563: END IF;
57727: l_tmp_amt NUMBER;
57728: l_acc_rev_natural_side_code VARCHAR2(1);
57729:
57730: l_num_entries NUMBER;
57731: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57732: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57733: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57734: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57735: l_recog_line_1 NUMBER;
57728: l_acc_rev_natural_side_code VARCHAR2(1);
57729:
57730: l_num_entries NUMBER;
57731: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57732: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57733: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57734: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57735: l_recog_line_1 NUMBER;
57736: l_recog_line_2 NUMBER;
57729:
57730: l_num_entries NUMBER;
57731: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57732: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57733: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57734: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57735: l_recog_line_1 NUMBER;
57736: l_recog_line_2 NUMBER;
57737:
57730: l_num_entries NUMBER;
57731: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
57732: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
57733: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
57734: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
57735: l_recog_line_1 NUMBER;
57736: l_recog_line_2 NUMBER;
57737:
57738: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
57736: l_recog_line_2 NUMBER;
57737:
57738: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
57739: l_bflow_applied_to_amt NUMBER; -- 5132302
57740: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
57741:
57742: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
57743:
57744: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
57811: l_accrual_line_num := NULL; -- 4262811
57812: l_tmp_amt := NULL; -- 4262811
57813: --
57814:
57815: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
57816: l_balance_type_code <> 'B' THEN
57817: IF NVL(p_source_33,'
57818: ') = 'FREIGHT'
57819: THEN
57883: --
57884: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
57885:
57886: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
57887: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
57888:
57889: -- 4955764
57890: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
57891: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
58007: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
58008:
58009: IF xla_accounting_cache_pkg.GetValueChar
58010: (p_source_code => 'LEDGER_CATEGORY_CODE'
58011: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
58012: AND l_bflow_method_code = 'PRIOR_ENTRY'
58013: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
58014: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
58015: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
58136: p_lookup_type => 'XLA_OWNER_TYPE'
58137: ,p_lookup_code => l_component_type_code
58138: )
58139: ,p_token_4 => 'PRODUCT_NAME'
58140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58144: ,p_ae_header_id => NULL
58137: ,p_lookup_code => l_component_type_code
58138: )
58139: ,p_token_4 => 'PRODUCT_NAME'
58140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58144: ,p_ae_header_id => NULL
58145: );
58138: )
58139: ,p_token_4 => 'PRODUCT_NAME'
58140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58144: ,p_ae_header_id => NULL
58145: );
58146:
58139: ,p_token_4 => 'PRODUCT_NAME'
58140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58144: ,p_ae_header_id => NULL
58145: );
58146:
58147: IF (C_LEVEL_ERROR>= g_log_level) THEN
58170: ----------------------------------------------------------------------------------
58171: -- 4219869 Business Flow
58172: -- Update journal entry status -- Need to generate this within IF
58173: ----------------------------------------------------------------------------------
58174: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
58175: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
58176: ,p_balance_type_code => l_balance_type_code
58177: );
58178:
58257:
58258: --
58259: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
58260: --
58261: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
58262: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
58263: ELSE
58264: ---------------------------------------------------------------------------------------------------
58265: -- 4262811a Switch Sign
58282:
58283: XLA_AE_LINES_PKG.ValidateCurrentLine;
58284: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
58285:
58286: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
58287: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
58288: ,p_balance_type_code => l_balance_type_code);
58289:
58290: END IF;
58452: l_tmp_amt NUMBER;
58453: l_acc_rev_natural_side_code VARCHAR2(1);
58454:
58455: l_num_entries NUMBER;
58456: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
58457: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
58458: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
58459: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
58460: l_recog_line_1 NUMBER;
58453: l_acc_rev_natural_side_code VARCHAR2(1);
58454:
58455: l_num_entries NUMBER;
58456: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
58457: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
58458: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
58459: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
58460: l_recog_line_1 NUMBER;
58461: l_recog_line_2 NUMBER;
58454:
58455: l_num_entries NUMBER;
58456: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
58457: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
58458: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
58459: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
58460: l_recog_line_1 NUMBER;
58461: l_recog_line_2 NUMBER;
58462:
58455: l_num_entries NUMBER;
58456: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
58457: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
58458: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
58459: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
58460: l_recog_line_1 NUMBER;
58461: l_recog_line_2 NUMBER;
58462:
58463: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
58461: l_recog_line_2 NUMBER;
58462:
58463: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
58464: l_bflow_applied_to_amt NUMBER; -- 5132302
58465: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
58466:
58467: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
58468:
58469: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
58536: l_accrual_line_num := NULL; -- 4262811
58537: l_tmp_amt := NULL; -- 4262811
58538: --
58539:
58540: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
58541: l_balance_type_code <> 'B' THEN
58542: IF NVL(p_source_33,'
58543: ') = 'FREIGHT'
58544: THEN
58608: --
58609: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
58610:
58611: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
58612: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
58613:
58614: -- 4955764
58615: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
58616: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
58730: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
58731:
58732: IF xla_accounting_cache_pkg.GetValueChar
58733: (p_source_code => 'LEDGER_CATEGORY_CODE'
58734: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
58735: AND l_bflow_method_code = 'PRIOR_ENTRY'
58736: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
58737: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
58738: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
58859: p_lookup_type => 'XLA_OWNER_TYPE'
58860: ,p_lookup_code => l_component_type_code
58861: )
58862: ,p_token_4 => 'PRODUCT_NAME'
58863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58867: ,p_ae_header_id => NULL
58860: ,p_lookup_code => l_component_type_code
58861: )
58862: ,p_token_4 => 'PRODUCT_NAME'
58863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58867: ,p_ae_header_id => NULL
58868: );
58861: )
58862: ,p_token_4 => 'PRODUCT_NAME'
58863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58867: ,p_ae_header_id => NULL
58868: );
58869:
58862: ,p_token_4 => 'PRODUCT_NAME'
58863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
58864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
58865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
58866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
58867: ,p_ae_header_id => NULL
58868: );
58869:
58870: IF (C_LEVEL_ERROR>= g_log_level) THEN
58893: ----------------------------------------------------------------------------------
58894: -- 4219869 Business Flow
58895: -- Update journal entry status -- Need to generate this within IF
58896: ----------------------------------------------------------------------------------
58897: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
58898: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
58899: ,p_balance_type_code => l_balance_type_code
58900: );
58901:
58980:
58981: --
58982: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
58983: --
58984: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
58985: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
58986: ELSE
58987: ---------------------------------------------------------------------------------------------------
58988: -- 4262811a Switch Sign
59005:
59006: XLA_AE_LINES_PKG.ValidateCurrentLine;
59007: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
59008:
59009: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
59010: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
59011: ,p_balance_type_code => l_balance_type_code);
59012:
59013: END IF;
59177: l_tmp_amt NUMBER;
59178: l_acc_rev_natural_side_code VARCHAR2(1);
59179:
59180: l_num_entries NUMBER;
59181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59185: l_recog_line_1 NUMBER;
59178: l_acc_rev_natural_side_code VARCHAR2(1);
59179:
59180: l_num_entries NUMBER;
59181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59185: l_recog_line_1 NUMBER;
59186: l_recog_line_2 NUMBER;
59179:
59180: l_num_entries NUMBER;
59181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59185: l_recog_line_1 NUMBER;
59186: l_recog_line_2 NUMBER;
59187:
59180: l_num_entries NUMBER;
59181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59185: l_recog_line_1 NUMBER;
59186: l_recog_line_2 NUMBER;
59187:
59188: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
59186: l_recog_line_2 NUMBER;
59187:
59188: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
59189: l_bflow_applied_to_amt NUMBER; -- 5132302
59190: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
59191:
59192: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
59193:
59194: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
59261: l_accrual_line_num := NULL; -- 4262811
59262: l_tmp_amt := NULL; -- 4262811
59263: --
59264:
59265: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
59266: l_balance_type_code <> 'B' THEN
59267: IF NVL(p_source_33,'
59268: ') = 'FREIGHT'
59269: THEN
59333: --
59334: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
59335:
59336: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
59337: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
59338:
59339: -- 4955764
59340: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
59341: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
59459: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
59460:
59461: IF xla_accounting_cache_pkg.GetValueChar
59462: (p_source_code => 'LEDGER_CATEGORY_CODE'
59463: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
59464: AND l_bflow_method_code = 'PRIOR_ENTRY'
59465: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
59466: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
59467: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
59588: p_lookup_type => 'XLA_OWNER_TYPE'
59589: ,p_lookup_code => l_component_type_code
59590: )
59591: ,p_token_4 => 'PRODUCT_NAME'
59592: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
59593: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
59594: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
59595: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
59596: ,p_ae_header_id => NULL
59589: ,p_lookup_code => l_component_type_code
59590: )
59591: ,p_token_4 => 'PRODUCT_NAME'
59592: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
59593: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
59594: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
59595: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
59596: ,p_ae_header_id => NULL
59597: );
59590: )
59591: ,p_token_4 => 'PRODUCT_NAME'
59592: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
59593: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
59594: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
59595: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
59596: ,p_ae_header_id => NULL
59597: );
59598:
59591: ,p_token_4 => 'PRODUCT_NAME'
59592: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
59593: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
59594: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
59595: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
59596: ,p_ae_header_id => NULL
59597: );
59598:
59599: IF (C_LEVEL_ERROR>= g_log_level) THEN
59622: ----------------------------------------------------------------------------------
59623: -- 4219869 Business Flow
59624: -- Update journal entry status -- Need to generate this within IF
59625: ----------------------------------------------------------------------------------
59626: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
59627: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
59628: ,p_balance_type_code => l_balance_type_code
59629: );
59630:
59709:
59710: --
59711: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
59712: --
59713: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
59714: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
59715: ELSE
59716: ---------------------------------------------------------------------------------------------------
59717: -- 4262811a Switch Sign
59734:
59735: XLA_AE_LINES_PKG.ValidateCurrentLine;
59736: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
59737:
59738: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
59739: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
59740: ,p_balance_type_code => l_balance_type_code);
59741:
59742: END IF;
59906: l_tmp_amt NUMBER;
59907: l_acc_rev_natural_side_code VARCHAR2(1);
59908:
59909: l_num_entries NUMBER;
59910: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59911: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59912: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59913: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59914: l_recog_line_1 NUMBER;
59907: l_acc_rev_natural_side_code VARCHAR2(1);
59908:
59909: l_num_entries NUMBER;
59910: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59911: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59912: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59913: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59914: l_recog_line_1 NUMBER;
59915: l_recog_line_2 NUMBER;
59908:
59909: l_num_entries NUMBER;
59910: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59911: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59912: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59913: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59914: l_recog_line_1 NUMBER;
59915: l_recog_line_2 NUMBER;
59916:
59909: l_num_entries NUMBER;
59910: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
59911: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
59912: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
59913: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
59914: l_recog_line_1 NUMBER;
59915: l_recog_line_2 NUMBER;
59916:
59917: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
59915: l_recog_line_2 NUMBER;
59916:
59917: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
59918: l_bflow_applied_to_amt NUMBER; -- 5132302
59919: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
59920:
59921: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
59922:
59923: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
59990: l_accrual_line_num := NULL; -- 4262811
59991: l_tmp_amt := NULL; -- 4262811
59992: --
59993:
59994: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
59995: l_balance_type_code <> 'B' THEN
59996: IF NVL(p_source_33,'
59997: ') = 'FREIGHT'
59998: THEN
60062: --
60063: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
60064:
60065: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
60066: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
60067:
60068: -- 4955764
60069: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
60070: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
60186: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
60187:
60188: IF xla_accounting_cache_pkg.GetValueChar
60189: (p_source_code => 'LEDGER_CATEGORY_CODE'
60190: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
60191: AND l_bflow_method_code = 'PRIOR_ENTRY'
60192: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
60193: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
60194: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
60315: p_lookup_type => 'XLA_OWNER_TYPE'
60316: ,p_lookup_code => l_component_type_code
60317: )
60318: ,p_token_4 => 'PRODUCT_NAME'
60319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
60320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
60321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
60322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
60323: ,p_ae_header_id => NULL
60316: ,p_lookup_code => l_component_type_code
60317: )
60318: ,p_token_4 => 'PRODUCT_NAME'
60319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
60320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
60321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
60322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
60323: ,p_ae_header_id => NULL
60324: );
60317: )
60318: ,p_token_4 => 'PRODUCT_NAME'
60319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
60320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
60321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
60322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
60323: ,p_ae_header_id => NULL
60324: );
60325:
60318: ,p_token_4 => 'PRODUCT_NAME'
60319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
60320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
60321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
60322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
60323: ,p_ae_header_id => NULL
60324: );
60325:
60326: IF (C_LEVEL_ERROR>= g_log_level) THEN
60349: ----------------------------------------------------------------------------------
60350: -- 4219869 Business Flow
60351: -- Update journal entry status -- Need to generate this within IF
60352: ----------------------------------------------------------------------------------
60353: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
60354: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
60355: ,p_balance_type_code => l_balance_type_code
60356: );
60357:
60436:
60437: --
60438: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
60439: --
60440: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
60441: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
60442: ELSE
60443: ---------------------------------------------------------------------------------------------------
60444: -- 4262811a Switch Sign
60461:
60462: XLA_AE_LINES_PKG.ValidateCurrentLine;
60463: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
60464:
60465: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
60466: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
60467: ,p_balance_type_code => l_balance_type_code);
60468:
60469: END IF;
60621: l_tmp_amt NUMBER;
60622: l_acc_rev_natural_side_code VARCHAR2(1);
60623:
60624: l_num_entries NUMBER;
60625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
60626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
60627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
60628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
60629: l_recog_line_1 NUMBER;
60622: l_acc_rev_natural_side_code VARCHAR2(1);
60623:
60624: l_num_entries NUMBER;
60625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
60626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
60627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
60628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
60629: l_recog_line_1 NUMBER;
60630: l_recog_line_2 NUMBER;
60623:
60624: l_num_entries NUMBER;
60625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
60626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
60627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
60628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
60629: l_recog_line_1 NUMBER;
60630: l_recog_line_2 NUMBER;
60631:
60624: l_num_entries NUMBER;
60625: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
60626: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
60627: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
60628: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
60629: l_recog_line_1 NUMBER;
60630: l_recog_line_2 NUMBER;
60631:
60632: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
60630: l_recog_line_2 NUMBER;
60631:
60632: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
60633: l_bflow_applied_to_amt NUMBER; -- 5132302
60634: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
60635:
60636: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
60637:
60638: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
60705: l_accrual_line_num := NULL; -- 4262811
60706: l_tmp_amt := NULL; -- 4262811
60707: --
60708:
60709: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
60710: l_balance_type_code <> 'B' THEN
60711: IF NVL(p_source_96,'
60712: ') <> 'CLEAR_CLEAR' AND
60713: NVL(p_source_96,'
60784: --
60785: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
60786:
60787: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
60788: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
60789:
60790: -- 4955764
60791: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
60792: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
60860: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
60861:
60862: IF xla_accounting_cache_pkg.GetValueChar
60863: (p_source_code => 'LEDGER_CATEGORY_CODE'
60864: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
60865: AND l_bflow_method_code = 'PRIOR_ENTRY'
60866: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
60867: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
60868: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
61075: p_lookup_type => 'XLA_OWNER_TYPE'
61076: ,p_lookup_code => l_component_type_code
61077: )
61078: ,p_token_4 => 'PRODUCT_NAME'
61079: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61080: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61081: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61082: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61083: ,p_ae_header_id => NULL
61076: ,p_lookup_code => l_component_type_code
61077: )
61078: ,p_token_4 => 'PRODUCT_NAME'
61079: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61080: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61081: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61082: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61083: ,p_ae_header_id => NULL
61084: );
61077: )
61078: ,p_token_4 => 'PRODUCT_NAME'
61079: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61080: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61081: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61082: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61083: ,p_ae_header_id => NULL
61084: );
61085:
61078: ,p_token_4 => 'PRODUCT_NAME'
61079: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61080: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61081: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61082: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61083: ,p_ae_header_id => NULL
61084: );
61085:
61086: IF (C_LEVEL_ERROR>= g_log_level) THEN
61109: ----------------------------------------------------------------------------------
61110: -- 4219869 Business Flow
61111: -- Update journal entry status -- Need to generate this within IF
61112: ----------------------------------------------------------------------------------
61113: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
61114: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
61115: ,p_balance_type_code => l_balance_type_code
61116: );
61117:
61293:
61294: --
61295: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
61296: --
61297: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
61298: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
61299: ELSE
61300: ---------------------------------------------------------------------------------------------------
61301: -- 4262811a Switch Sign
61318:
61319: XLA_AE_LINES_PKG.ValidateCurrentLine;
61320: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
61321:
61322: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
61323: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
61324: ,p_balance_type_code => l_balance_type_code);
61325:
61326: END IF;
61478: l_tmp_amt NUMBER;
61479: l_acc_rev_natural_side_code VARCHAR2(1);
61480:
61481: l_num_entries NUMBER;
61482: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
61483: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
61484: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
61485: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
61486: l_recog_line_1 NUMBER;
61479: l_acc_rev_natural_side_code VARCHAR2(1);
61480:
61481: l_num_entries NUMBER;
61482: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
61483: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
61484: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
61485: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
61486: l_recog_line_1 NUMBER;
61487: l_recog_line_2 NUMBER;
61480:
61481: l_num_entries NUMBER;
61482: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
61483: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
61484: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
61485: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
61486: l_recog_line_1 NUMBER;
61487: l_recog_line_2 NUMBER;
61488:
61481: l_num_entries NUMBER;
61482: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
61483: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
61484: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
61485: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
61486: l_recog_line_1 NUMBER;
61487: l_recog_line_2 NUMBER;
61488:
61489: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
61487: l_recog_line_2 NUMBER;
61488:
61489: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
61490: l_bflow_applied_to_amt NUMBER; -- 5132302
61491: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
61492:
61493: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
61494:
61495: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
61562: l_accrual_line_num := NULL; -- 4262811
61563: l_tmp_amt := NULL; -- 4262811
61564: --
61565:
61566: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
61567: l_balance_type_code <> 'B' THEN
61568: IF NVL(p_source_96,'
61569: ') = 'ALWAYS_CLEAR' AND
61570: NVL(p_source_97,'
61639: --
61640: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
61641:
61642: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
61643: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
61644:
61645: -- 4955764
61646: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
61647: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
61715: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
61716:
61717: IF xla_accounting_cache_pkg.GetValueChar
61718: (p_source_code => 'LEDGER_CATEGORY_CODE'
61719: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
61720: AND l_bflow_method_code = 'PRIOR_ENTRY'
61721: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
61722: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
61723: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
61930: p_lookup_type => 'XLA_OWNER_TYPE'
61931: ,p_lookup_code => l_component_type_code
61932: )
61933: ,p_token_4 => 'PRODUCT_NAME'
61934: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61935: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61936: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61937: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61938: ,p_ae_header_id => NULL
61931: ,p_lookup_code => l_component_type_code
61932: )
61933: ,p_token_4 => 'PRODUCT_NAME'
61934: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61935: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61936: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61937: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61938: ,p_ae_header_id => NULL
61939: );
61932: )
61933: ,p_token_4 => 'PRODUCT_NAME'
61934: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61935: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61936: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61937: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61938: ,p_ae_header_id => NULL
61939: );
61940:
61933: ,p_token_4 => 'PRODUCT_NAME'
61934: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
61935: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
61936: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
61937: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
61938: ,p_ae_header_id => NULL
61939: );
61940:
61941: IF (C_LEVEL_ERROR>= g_log_level) THEN
61964: ----------------------------------------------------------------------------------
61965: -- 4219869 Business Flow
61966: -- Update journal entry status -- Need to generate this within IF
61967: ----------------------------------------------------------------------------------
61968: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
61969: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
61970: ,p_balance_type_code => l_balance_type_code
61971: );
61972:
62148:
62149: --
62150: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
62151: --
62152: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
62153: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
62154: ELSE
62155: ---------------------------------------------------------------------------------------------------
62156: -- 4262811a Switch Sign
62173:
62174: XLA_AE_LINES_PKG.ValidateCurrentLine;
62175: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
62176:
62177: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
62178: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
62179: ,p_balance_type_code => l_balance_type_code);
62180:
62181: END IF;
62297: l_tmp_amt NUMBER;
62298: l_acc_rev_natural_side_code VARCHAR2(1);
62299:
62300: l_num_entries NUMBER;
62301: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62302: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62303: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62304: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62305: l_recog_line_1 NUMBER;
62298: l_acc_rev_natural_side_code VARCHAR2(1);
62299:
62300: l_num_entries NUMBER;
62301: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62302: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62303: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62304: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62305: l_recog_line_1 NUMBER;
62306: l_recog_line_2 NUMBER;
62299:
62300: l_num_entries NUMBER;
62301: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62302: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62303: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62304: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62305: l_recog_line_1 NUMBER;
62306: l_recog_line_2 NUMBER;
62307:
62300: l_num_entries NUMBER;
62301: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62302: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62303: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62304: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62305: l_recog_line_1 NUMBER;
62306: l_recog_line_2 NUMBER;
62307:
62308: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
62306: l_recog_line_2 NUMBER;
62307:
62308: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
62309: l_bflow_applied_to_amt NUMBER; -- 5132302
62310: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
62311:
62312: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
62313:
62314: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
62381: l_accrual_line_num := NULL; -- 4262811
62382: l_tmp_amt := NULL; -- 4262811
62383: --
62384:
62385: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
62386: l_balance_type_code <> 'B' THEN
62387: IF NVL(p_source_96,'
62388: ') <> 'CLEAR_CLEAR' AND
62389: p_source_114 IS NOT NULL AND
62458: --
62459: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
62460:
62461: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
62462: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
62463:
62464: -- 4955764
62465: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
62466: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
62516: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
62517:
62518: IF xla_accounting_cache_pkg.GetValueChar
62519: (p_source_code => 'LEDGER_CATEGORY_CODE'
62520: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
62521: AND l_bflow_method_code = 'PRIOR_ENTRY'
62522: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
62523: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
62524: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
62593: p_lookup_type => 'XLA_OWNER_TYPE'
62594: ,p_lookup_code => l_component_type_code
62595: )
62596: ,p_token_4 => 'PRODUCT_NAME'
62597: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
62598: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
62599: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
62600: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
62601: ,p_ae_header_id => NULL
62594: ,p_lookup_code => l_component_type_code
62595: )
62596: ,p_token_4 => 'PRODUCT_NAME'
62597: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
62598: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
62599: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
62600: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
62601: ,p_ae_header_id => NULL
62602: );
62595: )
62596: ,p_token_4 => 'PRODUCT_NAME'
62597: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
62598: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
62599: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
62600: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
62601: ,p_ae_header_id => NULL
62602: );
62603:
62596: ,p_token_4 => 'PRODUCT_NAME'
62597: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
62598: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
62599: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
62600: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
62601: ,p_ae_header_id => NULL
62602: );
62603:
62604: IF (C_LEVEL_ERROR>= g_log_level) THEN
62627: ----------------------------------------------------------------------------------
62628: -- 4219869 Business Flow
62629: -- Update journal entry status -- Need to generate this within IF
62630: ----------------------------------------------------------------------------------
62631: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
62632: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
62633: ,p_balance_type_code => l_balance_type_code
62634: );
62635:
62688:
62689: --
62690: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
62691: --
62692: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
62693: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
62694: ELSE
62695: ---------------------------------------------------------------------------------------------------
62696: -- 4262811a Switch Sign
62713:
62714: XLA_AE_LINES_PKG.ValidateCurrentLine;
62715: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
62716:
62717: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
62718: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
62719: ,p_balance_type_code => l_balance_type_code);
62720:
62721: END IF;
62854: l_tmp_amt NUMBER;
62855: l_acc_rev_natural_side_code VARCHAR2(1);
62856:
62857: l_num_entries NUMBER;
62858: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62859: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62860: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62861: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62862: l_recog_line_1 NUMBER;
62855: l_acc_rev_natural_side_code VARCHAR2(1);
62856:
62857: l_num_entries NUMBER;
62858: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62859: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62860: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62861: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62862: l_recog_line_1 NUMBER;
62863: l_recog_line_2 NUMBER;
62856:
62857: l_num_entries NUMBER;
62858: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62859: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62860: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62861: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62862: l_recog_line_1 NUMBER;
62863: l_recog_line_2 NUMBER;
62864:
62857: l_num_entries NUMBER;
62858: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
62859: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
62860: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
62861: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
62862: l_recog_line_1 NUMBER;
62863: l_recog_line_2 NUMBER;
62864:
62865: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
62863: l_recog_line_2 NUMBER;
62864:
62865: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
62866: l_bflow_applied_to_amt NUMBER; -- 5132302
62867: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
62868:
62869: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
62870:
62871: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
62938: l_accrual_line_num := NULL; -- 4262811
62939: l_tmp_amt := NULL; -- 4262811
62940: --
62941:
62942: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
62943: l_balance_type_code <> 'B' THEN
62944: IF NVL(p_source_96,'
62945: ') <> 'CLEAR_CLEAR' AND
62946: NVL(p_source_97,'
63012: --
63013: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
63014:
63015: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
63016: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
63017:
63018: -- 4955764
63019: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
63020: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
63080: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
63081:
63082: IF xla_accounting_cache_pkg.GetValueChar
63083: (p_source_code => 'LEDGER_CATEGORY_CODE'
63084: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
63085: AND l_bflow_method_code = 'PRIOR_ENTRY'
63086: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
63087: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
63088: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
63201: p_lookup_type => 'XLA_OWNER_TYPE'
63202: ,p_lookup_code => l_component_type_code
63203: )
63204: ,p_token_4 => 'PRODUCT_NAME'
63205: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63206: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63207: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63208: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63209: ,p_ae_header_id => NULL
63202: ,p_lookup_code => l_component_type_code
63203: )
63204: ,p_token_4 => 'PRODUCT_NAME'
63205: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63206: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63207: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63208: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63209: ,p_ae_header_id => NULL
63210: );
63203: )
63204: ,p_token_4 => 'PRODUCT_NAME'
63205: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63206: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63207: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63208: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63209: ,p_ae_header_id => NULL
63210: );
63211:
63204: ,p_token_4 => 'PRODUCT_NAME'
63205: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63206: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63207: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63208: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63209: ,p_ae_header_id => NULL
63210: );
63211:
63212: IF (C_LEVEL_ERROR>= g_log_level) THEN
63235: ----------------------------------------------------------------------------------
63236: -- 4219869 Business Flow
63237: -- Update journal entry status -- Need to generate this within IF
63238: ----------------------------------------------------------------------------------
63239: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
63240: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
63241: ,p_balance_type_code => l_balance_type_code
63242: );
63243:
63325:
63326: --
63327: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
63328: --
63329: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
63330: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
63331: ELSE
63332: ---------------------------------------------------------------------------------------------------
63333: -- 4262811a Switch Sign
63350:
63351: XLA_AE_LINES_PKG.ValidateCurrentLine;
63352: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
63353:
63354: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
63355: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
63356: ,p_balance_type_code => l_balance_type_code);
63357:
63358: END IF;
63499: l_tmp_amt NUMBER;
63500: l_acc_rev_natural_side_code VARCHAR2(1);
63501:
63502: l_num_entries NUMBER;
63503: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
63504: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
63505: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
63506: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
63507: l_recog_line_1 NUMBER;
63500: l_acc_rev_natural_side_code VARCHAR2(1);
63501:
63502: l_num_entries NUMBER;
63503: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
63504: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
63505: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
63506: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
63507: l_recog_line_1 NUMBER;
63508: l_recog_line_2 NUMBER;
63501:
63502: l_num_entries NUMBER;
63503: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
63504: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
63505: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
63506: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
63507: l_recog_line_1 NUMBER;
63508: l_recog_line_2 NUMBER;
63509:
63502: l_num_entries NUMBER;
63503: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
63504: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
63505: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
63506: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
63507: l_recog_line_1 NUMBER;
63508: l_recog_line_2 NUMBER;
63509:
63510: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
63508: l_recog_line_2 NUMBER;
63509:
63510: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
63511: l_bflow_applied_to_amt NUMBER; -- 5132302
63512: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
63513:
63514: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
63515:
63516: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
63582: l_acc_rev_flag := NULL; -- 4262811
63583: l_accrual_line_num := NULL; -- 4262811
63584: l_tmp_amt := NULL; -- 4262811
63585: --
63586: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
63587: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
63588: return;
63589: END IF;
63590:
63583: l_accrual_line_num := NULL; -- 4262811
63584: l_tmp_amt := NULL; -- 4262811
63585: --
63586: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
63587: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
63588: return;
63589: END IF;
63590:
63591: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
63587: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
63588: return;
63589: END IF;
63590:
63591: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
63592: l_balance_type_code <> 'B' THEN
63593: IF (NVL(p_source_96,'
63594: ') = 'CLEAR_CLEAR' OR
63595: NVL(p_source_96,'
63673: --
63674: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
63675:
63676: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
63677: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
63678:
63679: -- 4955764
63680: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
63681: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
63749: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
63750:
63751: IF xla_accounting_cache_pkg.GetValueChar
63752: (p_source_code => 'LEDGER_CATEGORY_CODE'
63753: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
63754: AND l_bflow_method_code = 'PRIOR_ENTRY'
63755: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
63756: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
63757: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
63958: p_lookup_type => 'XLA_OWNER_TYPE'
63959: ,p_lookup_code => l_component_type_code
63960: )
63961: ,p_token_4 => 'PRODUCT_NAME'
63962: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63963: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63964: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63965: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63966: ,p_ae_header_id => NULL
63959: ,p_lookup_code => l_component_type_code
63960: )
63961: ,p_token_4 => 'PRODUCT_NAME'
63962: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63963: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63964: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63965: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63966: ,p_ae_header_id => NULL
63967: );
63960: )
63961: ,p_token_4 => 'PRODUCT_NAME'
63962: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63963: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63964: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63965: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63966: ,p_ae_header_id => NULL
63967: );
63968:
63961: ,p_token_4 => 'PRODUCT_NAME'
63962: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
63963: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
63964: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
63965: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
63966: ,p_ae_header_id => NULL
63967: );
63968:
63969: IF (C_LEVEL_ERROR>= g_log_level) THEN
63992: ----------------------------------------------------------------------------------
63993: -- 4219869 Business Flow
63994: -- Update journal entry status -- Need to generate this within IF
63995: ----------------------------------------------------------------------------------
63996: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
63997: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
63998: ,p_balance_type_code => l_balance_type_code
63999: );
64000:
64170:
64171: --
64172: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
64173: --
64174: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
64175: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
64176: ELSE
64177: ---------------------------------------------------------------------------------------------------
64178: -- 4262811a Switch Sign
64195:
64196: XLA_AE_LINES_PKG.ValidateCurrentLine;
64197: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
64198:
64199: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
64200: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
64201: ,p_balance_type_code => l_balance_type_code);
64202:
64203: END IF;
64340: l_tmp_amt NUMBER;
64341: l_acc_rev_natural_side_code VARCHAR2(1);
64342:
64343: l_num_entries NUMBER;
64344: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
64345: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
64346: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
64347: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
64348: l_recog_line_1 NUMBER;
64341: l_acc_rev_natural_side_code VARCHAR2(1);
64342:
64343: l_num_entries NUMBER;
64344: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
64345: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
64346: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
64347: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
64348: l_recog_line_1 NUMBER;
64349: l_recog_line_2 NUMBER;
64342:
64343: l_num_entries NUMBER;
64344: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
64345: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
64346: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
64347: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
64348: l_recog_line_1 NUMBER;
64349: l_recog_line_2 NUMBER;
64350:
64343: l_num_entries NUMBER;
64344: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
64345: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
64346: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
64347: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
64348: l_recog_line_1 NUMBER;
64349: l_recog_line_2 NUMBER;
64350:
64351: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
64349: l_recog_line_2 NUMBER;
64350:
64351: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
64352: l_bflow_applied_to_amt NUMBER; -- 5132302
64353: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
64354:
64355: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
64356:
64357: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
64423: l_acc_rev_flag := NULL; -- 4262811
64424: l_accrual_line_num := NULL; -- 4262811
64425: l_tmp_amt := NULL; -- 4262811
64426: --
64427: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
64428: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
64429: return;
64430: END IF;
64431:
64424: l_accrual_line_num := NULL; -- 4262811
64425: l_tmp_amt := NULL; -- 4262811
64426: --
64427: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
64428: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
64429: return;
64430: END IF;
64431:
64432: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
64428: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
64429: return;
64430: END IF;
64431:
64432: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
64433: l_balance_type_code <> 'B' THEN
64434: IF (NVL(p_source_96,'
64435: ') = 'CLEAR_CLEAR' OR
64436: NVL(p_source_96,'
64513: --
64514: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
64515:
64516: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
64517: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
64518:
64519: -- 4955764
64520: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
64521: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
64579: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
64580:
64581: IF xla_accounting_cache_pkg.GetValueChar
64582: (p_source_code => 'LEDGER_CATEGORY_CODE'
64583: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
64584: AND l_bflow_method_code = 'PRIOR_ENTRY'
64585: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
64586: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
64587: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
64862: p_lookup_type => 'XLA_OWNER_TYPE'
64863: ,p_lookup_code => l_component_type_code
64864: )
64865: ,p_token_4 => 'PRODUCT_NAME'
64866: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
64867: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
64868: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
64869: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
64870: ,p_ae_header_id => NULL
64863: ,p_lookup_code => l_component_type_code
64864: )
64865: ,p_token_4 => 'PRODUCT_NAME'
64866: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
64867: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
64868: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
64869: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
64870: ,p_ae_header_id => NULL
64871: );
64864: )
64865: ,p_token_4 => 'PRODUCT_NAME'
64866: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
64867: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
64868: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
64869: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
64870: ,p_ae_header_id => NULL
64871: );
64872:
64865: ,p_token_4 => 'PRODUCT_NAME'
64866: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
64867: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
64868: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
64869: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
64870: ,p_ae_header_id => NULL
64871: );
64872:
64873: IF (C_LEVEL_ERROR>= g_log_level) THEN
64896: ----------------------------------------------------------------------------------
64897: -- 4219869 Business Flow
64898: -- Update journal entry status -- Need to generate this within IF
64899: ----------------------------------------------------------------------------------
64900: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
64901: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
64902: ,p_balance_type_code => l_balance_type_code
64903: );
64904:
65148:
65149: --
65150: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
65151: --
65152: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
65153: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
65154: ELSE
65155: ---------------------------------------------------------------------------------------------------
65156: -- 4262811a Switch Sign
65173:
65174: XLA_AE_LINES_PKG.ValidateCurrentLine;
65175: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
65176:
65177: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
65178: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
65179: ,p_balance_type_code => l_balance_type_code);
65180:
65181: END IF;
65321: l_tmp_amt NUMBER;
65322: l_acc_rev_natural_side_code VARCHAR2(1);
65323:
65324: l_num_entries NUMBER;
65325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
65326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
65327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
65328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
65329: l_recog_line_1 NUMBER;
65322: l_acc_rev_natural_side_code VARCHAR2(1);
65323:
65324: l_num_entries NUMBER;
65325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
65326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
65327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
65328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
65329: l_recog_line_1 NUMBER;
65330: l_recog_line_2 NUMBER;
65323:
65324: l_num_entries NUMBER;
65325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
65326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
65327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
65328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
65329: l_recog_line_1 NUMBER;
65330: l_recog_line_2 NUMBER;
65331:
65324: l_num_entries NUMBER;
65325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
65326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
65327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
65328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
65329: l_recog_line_1 NUMBER;
65330: l_recog_line_2 NUMBER;
65331:
65332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
65330: l_recog_line_2 NUMBER;
65331:
65332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
65333: l_bflow_applied_to_amt NUMBER; -- 5132302
65334: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
65335:
65336: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
65337:
65338: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
65404: l_acc_rev_flag := NULL; -- 4262811
65405: l_accrual_line_num := NULL; -- 4262811
65406: l_tmp_amt := NULL; -- 4262811
65407: --
65408: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
65409: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
65410: return;
65411: END IF;
65412:
65405: l_accrual_line_num := NULL; -- 4262811
65406: l_tmp_amt := NULL; -- 4262811
65407: --
65408: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
65409: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
65410: return;
65411: END IF;
65412:
65413: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
65409: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
65410: return;
65411: END IF;
65412:
65413: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
65414: l_balance_type_code <> 'B' THEN
65415: IF (NVL(p_source_96,'
65416: ') <> 'CLEAR_CLEAR' AND
65417: NVL(p_source_96,'
65493: --
65494: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
65495:
65496: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
65497: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
65498:
65499: -- 4955764
65500: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
65501: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
65559: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
65560:
65561: IF xla_accounting_cache_pkg.GetValueChar
65562: (p_source_code => 'LEDGER_CATEGORY_CODE'
65563: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
65564: AND l_bflow_method_code = 'PRIOR_ENTRY'
65565: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
65566: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
65567: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
65842: p_lookup_type => 'XLA_OWNER_TYPE'
65843: ,p_lookup_code => l_component_type_code
65844: )
65845: ,p_token_4 => 'PRODUCT_NAME'
65846: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
65847: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
65848: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
65849: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
65850: ,p_ae_header_id => NULL
65843: ,p_lookup_code => l_component_type_code
65844: )
65845: ,p_token_4 => 'PRODUCT_NAME'
65846: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
65847: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
65848: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
65849: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
65850: ,p_ae_header_id => NULL
65851: );
65844: )
65845: ,p_token_4 => 'PRODUCT_NAME'
65846: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
65847: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
65848: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
65849: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
65850: ,p_ae_header_id => NULL
65851: );
65852:
65845: ,p_token_4 => 'PRODUCT_NAME'
65846: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
65847: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
65848: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
65849: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
65850: ,p_ae_header_id => NULL
65851: );
65852:
65853: IF (C_LEVEL_ERROR>= g_log_level) THEN
65876: ----------------------------------------------------------------------------------
65877: -- 4219869 Business Flow
65878: -- Update journal entry status -- Need to generate this within IF
65879: ----------------------------------------------------------------------------------
65880: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
65881: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
65882: ,p_balance_type_code => l_balance_type_code
65883: );
65884:
66128:
66129: --
66130: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
66131: --
66132: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
66133: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
66134: ELSE
66135: ---------------------------------------------------------------------------------------------------
66136: -- 4262811a Switch Sign
66153:
66154: XLA_AE_LINES_PKG.ValidateCurrentLine;
66155: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
66156:
66157: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
66158: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
66159: ,p_balance_type_code => l_balance_type_code);
66160:
66161: END IF;
66292: l_tmp_amt NUMBER;
66293: l_acc_rev_natural_side_code VARCHAR2(1);
66294:
66295: l_num_entries NUMBER;
66296: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
66297: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
66298: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
66299: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
66300: l_recog_line_1 NUMBER;
66293: l_acc_rev_natural_side_code VARCHAR2(1);
66294:
66295: l_num_entries NUMBER;
66296: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
66297: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
66298: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
66299: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
66300: l_recog_line_1 NUMBER;
66301: l_recog_line_2 NUMBER;
66294:
66295: l_num_entries NUMBER;
66296: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
66297: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
66298: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
66299: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
66300: l_recog_line_1 NUMBER;
66301: l_recog_line_2 NUMBER;
66302:
66295: l_num_entries NUMBER;
66296: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
66297: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
66298: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
66299: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
66300: l_recog_line_1 NUMBER;
66301: l_recog_line_2 NUMBER;
66302:
66303: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
66301: l_recog_line_2 NUMBER;
66302:
66303: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
66304: l_bflow_applied_to_amt NUMBER; -- 5132302
66305: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
66306:
66307: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
66308:
66309: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
66375: l_acc_rev_flag := NULL; -- 4262811
66376: l_accrual_line_num := NULL; -- 4262811
66377: l_tmp_amt := NULL; -- 4262811
66378: --
66379: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
66380: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
66381: return;
66382: END IF;
66383:
66376: l_accrual_line_num := NULL; -- 4262811
66377: l_tmp_amt := NULL; -- 4262811
66378: --
66379: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
66380: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
66381: return;
66382: END IF;
66383:
66384: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
66380: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
66381: return;
66382: END IF;
66383:
66384: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
66385: l_balance_type_code <> 'B' THEN
66386: IF (NVL(p_source_96,'
66387: ') = 'ALWAYS_ALWAYS' OR
66388: NVL(p_source_96,'
66463: --
66464: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
66465:
66466: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
66467: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
66468:
66469: -- 4955764
66470: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
66471: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
66521: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
66522:
66523: IF xla_accounting_cache_pkg.GetValueChar
66524: (p_source_code => 'LEDGER_CATEGORY_CODE'
66525: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
66526: AND l_bflow_method_code = 'PRIOR_ENTRY'
66527: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
66528: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
66529: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
66804: p_lookup_type => 'XLA_OWNER_TYPE'
66805: ,p_lookup_code => l_component_type_code
66806: )
66807: ,p_token_4 => 'PRODUCT_NAME'
66808: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
66809: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
66810: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
66811: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
66812: ,p_ae_header_id => NULL
66805: ,p_lookup_code => l_component_type_code
66806: )
66807: ,p_token_4 => 'PRODUCT_NAME'
66808: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
66809: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
66810: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
66811: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
66812: ,p_ae_header_id => NULL
66813: );
66806: )
66807: ,p_token_4 => 'PRODUCT_NAME'
66808: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
66809: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
66810: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
66811: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
66812: ,p_ae_header_id => NULL
66813: );
66814:
66807: ,p_token_4 => 'PRODUCT_NAME'
66808: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
66809: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
66810: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
66811: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
66812: ,p_ae_header_id => NULL
66813: );
66814:
66815: IF (C_LEVEL_ERROR>= g_log_level) THEN
66838: ----------------------------------------------------------------------------------
66839: -- 4219869 Business Flow
66840: -- Update journal entry status -- Need to generate this within IF
66841: ----------------------------------------------------------------------------------
66842: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
66843: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
66844: ,p_balance_type_code => l_balance_type_code
66845: );
66846:
67090:
67091: --
67092: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
67093: --
67094: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
67095: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
67096: ELSE
67097: ---------------------------------------------------------------------------------------------------
67098: -- 4262811a Switch Sign
67115:
67116: XLA_AE_LINES_PKG.ValidateCurrentLine;
67117: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
67118:
67119: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
67120: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
67121: ,p_balance_type_code => l_balance_type_code);
67122:
67123: END IF;
67285: l_tmp_amt NUMBER;
67286: l_acc_rev_natural_side_code VARCHAR2(1);
67287:
67288: l_num_entries NUMBER;
67289: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
67290: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
67291: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
67292: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
67293: l_recog_line_1 NUMBER;
67286: l_acc_rev_natural_side_code VARCHAR2(1);
67287:
67288: l_num_entries NUMBER;
67289: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
67290: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
67291: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
67292: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
67293: l_recog_line_1 NUMBER;
67294: l_recog_line_2 NUMBER;
67287:
67288: l_num_entries NUMBER;
67289: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
67290: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
67291: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
67292: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
67293: l_recog_line_1 NUMBER;
67294: l_recog_line_2 NUMBER;
67295:
67288: l_num_entries NUMBER;
67289: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
67290: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
67291: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
67292: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
67293: l_recog_line_1 NUMBER;
67294: l_recog_line_2 NUMBER;
67295:
67296: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
67294: l_recog_line_2 NUMBER;
67295:
67296: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
67297: l_bflow_applied_to_amt NUMBER; -- 5132302
67298: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
67299:
67300: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
67301:
67302: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
67368: l_acc_rev_flag := NULL; -- 4262811
67369: l_accrual_line_num := NULL; -- 4262811
67370: l_tmp_amt := NULL; -- 4262811
67371: --
67372: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
67373: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
67374: return;
67375: END IF;
67376:
67369: l_accrual_line_num := NULL; -- 4262811
67370: l_tmp_amt := NULL; -- 4262811
67371: --
67372: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
67373: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
67374: return;
67375: END IF;
67376:
67377: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
67373: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
67374: return;
67375: END IF;
67376:
67377: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
67378: l_balance_type_code <> 'B' THEN
67379: IF NVL(p_source_143,'
67380: ') = 'PREPAY APPL'
67381: THEN
67445: --
67446: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
67447:
67448: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
67449: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
67450:
67451: -- 4955764
67452: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
67453: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
67561: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
67562:
67563: IF xla_accounting_cache_pkg.GetValueChar
67564: (p_source_code => 'LEDGER_CATEGORY_CODE'
67565: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
67566: AND l_bflow_method_code = 'PRIOR_ENTRY'
67567: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
67568: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
67569: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
67826: p_lookup_type => 'XLA_OWNER_TYPE'
67827: ,p_lookup_code => l_component_type_code
67828: )
67829: ,p_token_4 => 'PRODUCT_NAME'
67830: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
67831: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
67832: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
67833: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
67834: ,p_ae_header_id => NULL
67827: ,p_lookup_code => l_component_type_code
67828: )
67829: ,p_token_4 => 'PRODUCT_NAME'
67830: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
67831: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
67832: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
67833: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
67834: ,p_ae_header_id => NULL
67835: );
67828: )
67829: ,p_token_4 => 'PRODUCT_NAME'
67830: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
67831: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
67832: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
67833: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
67834: ,p_ae_header_id => NULL
67835: );
67836:
67829: ,p_token_4 => 'PRODUCT_NAME'
67830: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
67831: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
67832: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
67833: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
67834: ,p_ae_header_id => NULL
67835: );
67836:
67837: IF (C_LEVEL_ERROR>= g_log_level) THEN
67860: ----------------------------------------------------------------------------------
67861: -- 4219869 Business Flow
67862: -- Update journal entry status -- Need to generate this within IF
67863: ----------------------------------------------------------------------------------
67864: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
67865: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
67866: ,p_balance_type_code => l_balance_type_code
67867: );
67868:
68112:
68113: --
68114: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
68115: --
68116: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
68117: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
68118: ELSE
68119: ---------------------------------------------------------------------------------------------------
68120: -- 4262811a Switch Sign
68137:
68138: XLA_AE_LINES_PKG.ValidateCurrentLine;
68139: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
68140:
68141: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
68142: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
68143: ,p_balance_type_code => l_balance_type_code);
68144:
68145: END IF;
68283: l_tmp_amt NUMBER;
68284: l_acc_rev_natural_side_code VARCHAR2(1);
68285:
68286: l_num_entries NUMBER;
68287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
68288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
68289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
68290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
68291: l_recog_line_1 NUMBER;
68284: l_acc_rev_natural_side_code VARCHAR2(1);
68285:
68286: l_num_entries NUMBER;
68287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
68288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
68289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
68290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
68291: l_recog_line_1 NUMBER;
68292: l_recog_line_2 NUMBER;
68285:
68286: l_num_entries NUMBER;
68287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
68288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
68289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
68290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
68291: l_recog_line_1 NUMBER;
68292: l_recog_line_2 NUMBER;
68293:
68286: l_num_entries NUMBER;
68287: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
68288: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
68289: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
68290: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
68291: l_recog_line_1 NUMBER;
68292: l_recog_line_2 NUMBER;
68293:
68294: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
68292: l_recog_line_2 NUMBER;
68293:
68294: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
68295: l_bflow_applied_to_amt NUMBER; -- 5132302
68296: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
68297:
68298: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
68299:
68300: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
68366: l_acc_rev_flag := NULL; -- 4262811
68367: l_accrual_line_num := NULL; -- 4262811
68368: l_tmp_amt := NULL; -- 4262811
68369: --
68370: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
68371: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
68372: return;
68373: END IF;
68374:
68367: l_accrual_line_num := NULL; -- 4262811
68368: l_tmp_amt := NULL; -- 4262811
68369: --
68370: IF NOT ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
68371: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
68372: return;
68373: END IF;
68374:
68375: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
68371: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
68372: return;
68373: END IF;
68374:
68375: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
68376: l_balance_type_code <> 'B' THEN
68377: IF (NVL(p_source_96,'
68378: ') <> 'CLEAR_CLEAR' AND
68379: NVL(p_source_96,'
68455: --
68456: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
68457:
68458: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
68459: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
68460:
68461: -- 4955764
68462: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
68463: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
68519: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
68520:
68521: IF xla_accounting_cache_pkg.GetValueChar
68522: (p_source_code => 'LEDGER_CATEGORY_CODE'
68523: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
68524: AND l_bflow_method_code = 'PRIOR_ENTRY'
68525: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
68526: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
68527: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
68802: p_lookup_type => 'XLA_OWNER_TYPE'
68803: ,p_lookup_code => l_component_type_code
68804: )
68805: ,p_token_4 => 'PRODUCT_NAME'
68806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
68807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
68808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
68809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
68810: ,p_ae_header_id => NULL
68803: ,p_lookup_code => l_component_type_code
68804: )
68805: ,p_token_4 => 'PRODUCT_NAME'
68806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
68807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
68808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
68809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
68810: ,p_ae_header_id => NULL
68811: );
68804: )
68805: ,p_token_4 => 'PRODUCT_NAME'
68806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
68807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
68808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
68809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
68810: ,p_ae_header_id => NULL
68811: );
68812:
68805: ,p_token_4 => 'PRODUCT_NAME'
68806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
68807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
68808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
68809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
68810: ,p_ae_header_id => NULL
68811: );
68812:
68813: IF (C_LEVEL_ERROR>= g_log_level) THEN
68836: ----------------------------------------------------------------------------------
68837: -- 4219869 Business Flow
68838: -- Update journal entry status -- Need to generate this within IF
68839: ----------------------------------------------------------------------------------
68840: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
68841: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
68842: ,p_balance_type_code => l_balance_type_code
68843: );
68844:
69088:
69089: --
69090: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
69091: --
69092: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
69093: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
69094: ELSE
69095: ---------------------------------------------------------------------------------------------------
69096: -- 4262811a Switch Sign
69113:
69114: XLA_AE_LINES_PKG.ValidateCurrentLine;
69115: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
69116:
69117: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
69118: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
69119: ,p_balance_type_code => l_balance_type_code);
69120:
69121: END IF;
69264: l_tmp_amt NUMBER;
69265: l_acc_rev_natural_side_code VARCHAR2(1);
69266:
69267: l_num_entries NUMBER;
69268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
69269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
69270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
69271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
69272: l_recog_line_1 NUMBER;
69265: l_acc_rev_natural_side_code VARCHAR2(1);
69266:
69267: l_num_entries NUMBER;
69268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
69269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
69270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
69271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
69272: l_recog_line_1 NUMBER;
69273: l_recog_line_2 NUMBER;
69266:
69267: l_num_entries NUMBER;
69268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
69269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
69270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
69271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
69272: l_recog_line_1 NUMBER;
69273: l_recog_line_2 NUMBER;
69274:
69267: l_num_entries NUMBER;
69268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
69269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
69270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
69271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
69272: l_recog_line_1 NUMBER;
69273: l_recog_line_2 NUMBER;
69274:
69275: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
69273: l_recog_line_2 NUMBER;
69274:
69275: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
69276: l_bflow_applied_to_amt NUMBER; -- 5132302
69277: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
69278:
69279: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
69280:
69281: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
69347: l_acc_rev_flag := NULL; -- 4262811
69348: l_accrual_line_num := NULL; -- 4262811
69349: l_tmp_amt := NULL; -- 4262811
69350: --
69351: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
69352: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
69353: return;
69354: END IF;
69355:
69348: l_accrual_line_num := NULL; -- 4262811
69349: l_tmp_amt := NULL; -- 4262811
69350: --
69351: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
69352: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
69353: return;
69354: END IF;
69355:
69356: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
69352: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
69353: return;
69354: END IF;
69355:
69356: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
69357: l_balance_type_code <> 'B' THEN
69358: IF NVL(p_source_96,'
69359: ') = 'ALWAYS_ALWAYS' AND
69360: p_source_114 IS NOT NULL AND
69435: --
69436: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
69437:
69438: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
69439: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
69440:
69441: -- 4955764
69442: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
69443: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
69511: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
69512:
69513: IF xla_accounting_cache_pkg.GetValueChar
69514: (p_source_code => 'LEDGER_CATEGORY_CODE'
69515: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
69516: AND l_bflow_method_code = 'PRIOR_ENTRY'
69517: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
69518: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
69519: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
69720: p_lookup_type => 'XLA_OWNER_TYPE'
69721: ,p_lookup_code => l_component_type_code
69722: )
69723: ,p_token_4 => 'PRODUCT_NAME'
69724: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
69725: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
69726: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
69727: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
69728: ,p_ae_header_id => NULL
69721: ,p_lookup_code => l_component_type_code
69722: )
69723: ,p_token_4 => 'PRODUCT_NAME'
69724: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
69725: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
69726: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
69727: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
69728: ,p_ae_header_id => NULL
69729: );
69722: )
69723: ,p_token_4 => 'PRODUCT_NAME'
69724: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
69725: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
69726: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
69727: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
69728: ,p_ae_header_id => NULL
69729: );
69730:
69723: ,p_token_4 => 'PRODUCT_NAME'
69724: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
69725: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
69726: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
69727: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
69728: ,p_ae_header_id => NULL
69729: );
69730:
69731: IF (C_LEVEL_ERROR>= g_log_level) THEN
69754: ----------------------------------------------------------------------------------
69755: -- 4219869 Business Flow
69756: -- Update journal entry status -- Need to generate this within IF
69757: ----------------------------------------------------------------------------------
69758: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
69759: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
69760: ,p_balance_type_code => l_balance_type_code
69761: );
69762:
69932:
69933: --
69934: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
69935: --
69936: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
69937: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
69938: ELSE
69939: ---------------------------------------------------------------------------------------------------
69940: -- 4262811a Switch Sign
69957:
69958: XLA_AE_LINES_PKG.ValidateCurrentLine;
69959: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
69960:
69961: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
69962: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
69963: ,p_balance_type_code => l_balance_type_code);
69964:
69965: END IF;
70113: l_tmp_amt NUMBER;
70114: l_acc_rev_natural_side_code VARCHAR2(1);
70115:
70116: l_num_entries NUMBER;
70117: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70118: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70119: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70120: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70121: l_recog_line_1 NUMBER;
70114: l_acc_rev_natural_side_code VARCHAR2(1);
70115:
70116: l_num_entries NUMBER;
70117: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70118: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70119: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70120: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70121: l_recog_line_1 NUMBER;
70122: l_recog_line_2 NUMBER;
70115:
70116: l_num_entries NUMBER;
70117: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70118: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70119: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70120: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70121: l_recog_line_1 NUMBER;
70122: l_recog_line_2 NUMBER;
70123:
70116: l_num_entries NUMBER;
70117: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70118: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70119: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70120: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70121: l_recog_line_1 NUMBER;
70122: l_recog_line_2 NUMBER;
70123:
70124: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
70122: l_recog_line_2 NUMBER;
70123:
70124: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
70125: l_bflow_applied_to_amt NUMBER; -- 5132302
70126: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
70127:
70128: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
70129:
70130: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
70196: l_acc_rev_flag := NULL; -- 4262811
70197: l_accrual_line_num := NULL; -- 4262811
70198: l_tmp_amt := NULL; -- 4262811
70199: --
70200: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
70201: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
70202: return;
70203: END IF;
70204:
70197: l_accrual_line_num := NULL; -- 4262811
70198: l_tmp_amt := NULL; -- 4262811
70199: --
70200: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
70201: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
70202: return;
70203: END IF;
70204:
70205: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
70201: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
70202: return;
70203: END IF;
70204:
70205: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
70206: l_balance_type_code <> 'B' THEN
70207: IF (NVL(p_source_96,'
70208: ') <> 'CLEAR_CLEAR' AND
70209: NVL(p_source_96,'
70289: --
70290: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
70291:
70292: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
70293: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
70294:
70295: -- 4955764
70296: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
70297: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
70365: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
70366:
70367: IF xla_accounting_cache_pkg.GetValueChar
70368: (p_source_code => 'LEDGER_CATEGORY_CODE'
70369: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
70370: AND l_bflow_method_code = 'PRIOR_ENTRY'
70371: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
70372: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
70373: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
70574: p_lookup_type => 'XLA_OWNER_TYPE'
70575: ,p_lookup_code => l_component_type_code
70576: )
70577: ,p_token_4 => 'PRODUCT_NAME'
70578: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
70579: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
70580: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
70581: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
70582: ,p_ae_header_id => NULL
70575: ,p_lookup_code => l_component_type_code
70576: )
70577: ,p_token_4 => 'PRODUCT_NAME'
70578: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
70579: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
70580: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
70581: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
70582: ,p_ae_header_id => NULL
70583: );
70576: )
70577: ,p_token_4 => 'PRODUCT_NAME'
70578: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
70579: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
70580: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
70581: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
70582: ,p_ae_header_id => NULL
70583: );
70584:
70577: ,p_token_4 => 'PRODUCT_NAME'
70578: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
70579: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
70580: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
70581: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
70582: ,p_ae_header_id => NULL
70583: );
70584:
70585: IF (C_LEVEL_ERROR>= g_log_level) THEN
70608: ----------------------------------------------------------------------------------
70609: -- 4219869 Business Flow
70610: -- Update journal entry status -- Need to generate this within IF
70611: ----------------------------------------------------------------------------------
70612: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
70613: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
70614: ,p_balance_type_code => l_balance_type_code
70615: );
70616:
70786:
70787: --
70788: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
70789: --
70790: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
70791: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
70792: ELSE
70793: ---------------------------------------------------------------------------------------------------
70794: -- 4262811a Switch Sign
70811:
70812: XLA_AE_LINES_PKG.ValidateCurrentLine;
70813: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
70814:
70815: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
70816: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
70817: ,p_balance_type_code => l_balance_type_code);
70818:
70819: END IF;
70962: l_tmp_amt NUMBER;
70963: l_acc_rev_natural_side_code VARCHAR2(1);
70964:
70965: l_num_entries NUMBER;
70966: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70967: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70968: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70969: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70970: l_recog_line_1 NUMBER;
70963: l_acc_rev_natural_side_code VARCHAR2(1);
70964:
70965: l_num_entries NUMBER;
70966: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70967: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70968: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70969: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70970: l_recog_line_1 NUMBER;
70971: l_recog_line_2 NUMBER;
70964:
70965: l_num_entries NUMBER;
70966: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70967: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70968: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70969: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70970: l_recog_line_1 NUMBER;
70971: l_recog_line_2 NUMBER;
70972:
70965: l_num_entries NUMBER;
70966: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
70967: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
70968: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
70969: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
70970: l_recog_line_1 NUMBER;
70971: l_recog_line_2 NUMBER;
70972:
70973: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
70971: l_recog_line_2 NUMBER;
70972:
70973: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
70974: l_bflow_applied_to_amt NUMBER; -- 5132302
70975: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
70976:
70977: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
70978:
70979: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
71045: l_acc_rev_flag := NULL; -- 4262811
71046: l_accrual_line_num := NULL; -- 4262811
71047: l_tmp_amt := NULL; -- 4262811
71048: --
71049: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
71050: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
71051: return;
71052: END IF;
71053:
71046: l_accrual_line_num := NULL; -- 4262811
71047: l_tmp_amt := NULL; -- 4262811
71048: --
71049: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
71050: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
71051: return;
71052: END IF;
71053:
71054: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
71050: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
71051: return;
71052: END IF;
71053:
71054: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
71055: l_balance_type_code <> 'B' THEN
71056: IF NVL(p_source_96,'
71057: ') = 'ALWAYS_ALWAYS' AND
71058: p_source_114 IS NULL AND
71135: --
71136: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
71137:
71138: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
71139: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
71140:
71141: -- 4955764
71142: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
71143: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
71211: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
71212:
71213: IF xla_accounting_cache_pkg.GetValueChar
71214: (p_source_code => 'LEDGER_CATEGORY_CODE'
71215: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
71216: AND l_bflow_method_code = 'PRIOR_ENTRY'
71217: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
71218: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
71219: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
71420: p_lookup_type => 'XLA_OWNER_TYPE'
71421: ,p_lookup_code => l_component_type_code
71422: )
71423: ,p_token_4 => 'PRODUCT_NAME'
71424: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
71425: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
71426: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
71427: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
71428: ,p_ae_header_id => NULL
71421: ,p_lookup_code => l_component_type_code
71422: )
71423: ,p_token_4 => 'PRODUCT_NAME'
71424: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
71425: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
71426: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
71427: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
71428: ,p_ae_header_id => NULL
71429: );
71422: )
71423: ,p_token_4 => 'PRODUCT_NAME'
71424: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
71425: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
71426: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
71427: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
71428: ,p_ae_header_id => NULL
71429: );
71430:
71423: ,p_token_4 => 'PRODUCT_NAME'
71424: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
71425: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
71426: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
71427: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
71428: ,p_ae_header_id => NULL
71429: );
71430:
71431: IF (C_LEVEL_ERROR>= g_log_level) THEN
71454: ----------------------------------------------------------------------------------
71455: -- 4219869 Business Flow
71456: -- Update journal entry status -- Need to generate this within IF
71457: ----------------------------------------------------------------------------------
71458: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
71459: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
71460: ,p_balance_type_code => l_balance_type_code
71461: );
71462:
71632:
71633: --
71634: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
71635: --
71636: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
71637: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
71638: ELSE
71639: ---------------------------------------------------------------------------------------------------
71640: -- 4262811a Switch Sign
71657:
71658: XLA_AE_LINES_PKG.ValidateCurrentLine;
71659: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
71660:
71661: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
71662: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
71663: ,p_balance_type_code => l_balance_type_code);
71664:
71665: END IF;
71804: l_tmp_amt NUMBER;
71805: l_acc_rev_natural_side_code VARCHAR2(1);
71806:
71807: l_num_entries NUMBER;
71808: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
71809: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
71810: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
71811: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
71812: l_recog_line_1 NUMBER;
71805: l_acc_rev_natural_side_code VARCHAR2(1);
71806:
71807: l_num_entries NUMBER;
71808: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
71809: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
71810: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
71811: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
71812: l_recog_line_1 NUMBER;
71813: l_recog_line_2 NUMBER;
71806:
71807: l_num_entries NUMBER;
71808: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
71809: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
71810: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
71811: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
71812: l_recog_line_1 NUMBER;
71813: l_recog_line_2 NUMBER;
71814:
71807: l_num_entries NUMBER;
71808: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
71809: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
71810: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
71811: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
71812: l_recog_line_1 NUMBER;
71813: l_recog_line_2 NUMBER;
71814:
71815: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
71813: l_recog_line_2 NUMBER;
71814:
71815: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
71816: l_bflow_applied_to_amt NUMBER; -- 5132302
71817: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
71818:
71819: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
71820:
71821: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
71887: l_acc_rev_flag := NULL; -- 4262811
71888: l_accrual_line_num := NULL; -- 4262811
71889: l_tmp_amt := NULL; -- 4262811
71890: --
71891: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
71892: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
71893: return;
71894: END IF;
71895:
71888: l_accrual_line_num := NULL; -- 4262811
71889: l_tmp_amt := NULL; -- 4262811
71890: --
71891: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
71892: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
71893: return;
71894: END IF;
71895:
71896: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
71892: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
71893: return;
71894: END IF;
71895:
71896: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
71897: l_balance_type_code <> 'B' THEN
71898: IF (NVL(p_source_96,'
71899: ') = 'ALWAYS_ALWAYS' OR
71900: NVL(p_source_96,'
71979: --
71980: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
71981:
71982: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
71983: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
71984:
71985: -- 4955764
71986: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
71987: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
72047: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
72048:
72049: IF xla_accounting_cache_pkg.GetValueChar
72050: (p_source_code => 'LEDGER_CATEGORY_CODE'
72051: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
72052: AND l_bflow_method_code = 'PRIOR_ENTRY'
72053: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
72054: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
72055: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
72256: p_lookup_type => 'XLA_OWNER_TYPE'
72257: ,p_lookup_code => l_component_type_code
72258: )
72259: ,p_token_4 => 'PRODUCT_NAME'
72260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
72261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
72262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
72263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
72264: ,p_ae_header_id => NULL
72257: ,p_lookup_code => l_component_type_code
72258: )
72259: ,p_token_4 => 'PRODUCT_NAME'
72260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
72261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
72262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
72263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
72264: ,p_ae_header_id => NULL
72265: );
72258: )
72259: ,p_token_4 => 'PRODUCT_NAME'
72260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
72261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
72262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
72263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
72264: ,p_ae_header_id => NULL
72265: );
72266:
72259: ,p_token_4 => 'PRODUCT_NAME'
72260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
72261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
72262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
72263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
72264: ,p_ae_header_id => NULL
72265: );
72266:
72267: IF (C_LEVEL_ERROR>= g_log_level) THEN
72290: ----------------------------------------------------------------------------------
72291: -- 4219869 Business Flow
72292: -- Update journal entry status -- Need to generate this within IF
72293: ----------------------------------------------------------------------------------
72294: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
72295: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
72296: ,p_balance_type_code => l_balance_type_code
72297: );
72298:
72468:
72469: --
72470: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
72471: --
72472: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
72473: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
72474: ELSE
72475: ---------------------------------------------------------------------------------------------------
72476: -- 4262811a Switch Sign
72493:
72494: XLA_AE_LINES_PKG.ValidateCurrentLine;
72495: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
72496:
72497: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
72498: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
72499: ,p_balance_type_code => l_balance_type_code);
72500:
72501: END IF;
72669: l_tmp_amt NUMBER;
72670: l_acc_rev_natural_side_code VARCHAR2(1);
72671:
72672: l_num_entries NUMBER;
72673: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
72674: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
72675: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
72676: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
72677: l_recog_line_1 NUMBER;
72670: l_acc_rev_natural_side_code VARCHAR2(1);
72671:
72672: l_num_entries NUMBER;
72673: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
72674: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
72675: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
72676: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
72677: l_recog_line_1 NUMBER;
72678: l_recog_line_2 NUMBER;
72671:
72672: l_num_entries NUMBER;
72673: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
72674: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
72675: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
72676: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
72677: l_recog_line_1 NUMBER;
72678: l_recog_line_2 NUMBER;
72679:
72672: l_num_entries NUMBER;
72673: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
72674: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
72675: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
72676: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
72677: l_recog_line_1 NUMBER;
72678: l_recog_line_2 NUMBER;
72679:
72680: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
72678: l_recog_line_2 NUMBER;
72679:
72680: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
72681: l_bflow_applied_to_amt NUMBER; -- 5132302
72682: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
72683:
72684: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
72685:
72686: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
72752: l_acc_rev_flag := NULL; -- 4262811
72753: l_accrual_line_num := NULL; -- 4262811
72754: l_tmp_amt := NULL; -- 4262811
72755: --
72756: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
72757: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
72758: return;
72759: END IF;
72760:
72753: l_accrual_line_num := NULL; -- 4262811
72754: l_tmp_amt := NULL; -- 4262811
72755: --
72756: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
72757: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
72758: return;
72759: END IF;
72760:
72761: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
72757: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
72758: return;
72759: END IF;
72760:
72761: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
72762: l_balance_type_code <> 'B' THEN
72763: IF NVL(p_source_143,'
72764: ') = 'PREPAY APPL' AND
72765: NVL(p_source_159,'
72831: --
72832: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
72833:
72834: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
72835: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
72836:
72837: -- 4955764
72838: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
72839: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
72957: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
72958:
72959: IF xla_accounting_cache_pkg.GetValueChar
72960: (p_source_code => 'LEDGER_CATEGORY_CODE'
72961: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
72962: AND l_bflow_method_code = 'PRIOR_ENTRY'
72963: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
72964: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
72965: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
73148: p_lookup_type => 'XLA_OWNER_TYPE'
73149: ,p_lookup_code => l_component_type_code
73150: )
73151: ,p_token_4 => 'PRODUCT_NAME'
73152: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
73153: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
73154: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
73155: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
73156: ,p_ae_header_id => NULL
73149: ,p_lookup_code => l_component_type_code
73150: )
73151: ,p_token_4 => 'PRODUCT_NAME'
73152: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
73153: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
73154: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
73155: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
73156: ,p_ae_header_id => NULL
73157: );
73150: )
73151: ,p_token_4 => 'PRODUCT_NAME'
73152: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
73153: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
73154: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
73155: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
73156: ,p_ae_header_id => NULL
73157: );
73158:
73151: ,p_token_4 => 'PRODUCT_NAME'
73152: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
73153: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
73154: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
73155: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
73156: ,p_ae_header_id => NULL
73157: );
73158:
73159: IF (C_LEVEL_ERROR>= g_log_level) THEN
73182: ----------------------------------------------------------------------------------
73183: -- 4219869 Business Flow
73184: -- Update journal entry status -- Need to generate this within IF
73185: ----------------------------------------------------------------------------------
73186: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
73187: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
73188: ,p_balance_type_code => l_balance_type_code
73189: );
73190:
73360:
73361: --
73362: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
73363: --
73364: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
73365: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
73366: ELSE
73367: ---------------------------------------------------------------------------------------------------
73368: -- 4262811a Switch Sign
73385:
73386: XLA_AE_LINES_PKG.ValidateCurrentLine;
73387: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
73388:
73389: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
73390: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
73391: ,p_balance_type_code => l_balance_type_code);
73392:
73393: END IF;
73539: l_tmp_amt NUMBER;
73540: l_acc_rev_natural_side_code VARCHAR2(1);
73541:
73542: l_num_entries NUMBER;
73543: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
73544: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
73545: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
73546: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
73547: l_recog_line_1 NUMBER;
73540: l_acc_rev_natural_side_code VARCHAR2(1);
73541:
73542: l_num_entries NUMBER;
73543: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
73544: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
73545: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
73546: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
73547: l_recog_line_1 NUMBER;
73548: l_recog_line_2 NUMBER;
73541:
73542: l_num_entries NUMBER;
73543: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
73544: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
73545: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
73546: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
73547: l_recog_line_1 NUMBER;
73548: l_recog_line_2 NUMBER;
73549:
73542: l_num_entries NUMBER;
73543: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
73544: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
73545: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
73546: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
73547: l_recog_line_1 NUMBER;
73548: l_recog_line_2 NUMBER;
73549:
73550: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
73548: l_recog_line_2 NUMBER;
73549:
73550: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
73551: l_bflow_applied_to_amt NUMBER; -- 5132302
73552: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
73553:
73554: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
73555:
73556: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
73622: l_acc_rev_flag := NULL; -- 4262811
73623: l_accrual_line_num := NULL; -- 4262811
73624: l_tmp_amt := NULL; -- 4262811
73625: --
73626: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
73627: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
73628: return;
73629: END IF;
73630:
73623: l_accrual_line_num := NULL; -- 4262811
73624: l_tmp_amt := NULL; -- 4262811
73625: --
73626: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
73627: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
73628: return;
73629: END IF;
73630:
73631: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
73627: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
73628: return;
73629: END IF;
73630:
73631: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
73632: l_balance_type_code <> 'B' THEN
73633: IF (NVL(p_source_96,'
73634: ') <> 'CLEAR_CLEAR' AND
73635: NVL(p_source_96,'
73713: --
73714: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
73715:
73716: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
73717: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
73718:
73719: -- 4955764
73720: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
73721: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
73787: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
73788:
73789: IF xla_accounting_cache_pkg.GetValueChar
73790: (p_source_code => 'LEDGER_CATEGORY_CODE'
73791: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
73792: AND l_bflow_method_code = 'PRIOR_ENTRY'
73793: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
73794: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
73795: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
73996: p_lookup_type => 'XLA_OWNER_TYPE'
73997: ,p_lookup_code => l_component_type_code
73998: )
73999: ,p_token_4 => 'PRODUCT_NAME'
74000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74004: ,p_ae_header_id => NULL
73997: ,p_lookup_code => l_component_type_code
73998: )
73999: ,p_token_4 => 'PRODUCT_NAME'
74000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74004: ,p_ae_header_id => NULL
74005: );
73998: )
73999: ,p_token_4 => 'PRODUCT_NAME'
74000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74004: ,p_ae_header_id => NULL
74005: );
74006:
73999: ,p_token_4 => 'PRODUCT_NAME'
74000: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74001: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74002: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74003: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74004: ,p_ae_header_id => NULL
74005: );
74006:
74007: IF (C_LEVEL_ERROR>= g_log_level) THEN
74030: ----------------------------------------------------------------------------------
74031: -- 4219869 Business Flow
74032: -- Update journal entry status -- Need to generate this within IF
74033: ----------------------------------------------------------------------------------
74034: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
74035: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
74036: ,p_balance_type_code => l_balance_type_code
74037: );
74038:
74208:
74209: --
74210: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
74211: --
74212: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
74213: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
74214: ELSE
74215: ---------------------------------------------------------------------------------------------------
74216: -- 4262811a Switch Sign
74233:
74234: XLA_AE_LINES_PKG.ValidateCurrentLine;
74235: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
74236:
74237: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
74238: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
74239: ,p_balance_type_code => l_balance_type_code);
74240:
74241: END IF;
74386: l_tmp_amt NUMBER;
74387: l_acc_rev_natural_side_code VARCHAR2(1);
74388:
74389: l_num_entries NUMBER;
74390: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
74391: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
74392: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
74393: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
74394: l_recog_line_1 NUMBER;
74387: l_acc_rev_natural_side_code VARCHAR2(1);
74388:
74389: l_num_entries NUMBER;
74390: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
74391: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
74392: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
74393: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
74394: l_recog_line_1 NUMBER;
74395: l_recog_line_2 NUMBER;
74388:
74389: l_num_entries NUMBER;
74390: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
74391: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
74392: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
74393: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
74394: l_recog_line_1 NUMBER;
74395: l_recog_line_2 NUMBER;
74396:
74389: l_num_entries NUMBER;
74390: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
74391: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
74392: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
74393: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
74394: l_recog_line_1 NUMBER;
74395: l_recog_line_2 NUMBER;
74396:
74397: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
74395: l_recog_line_2 NUMBER;
74396:
74397: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
74398: l_bflow_applied_to_amt NUMBER; -- 5132302
74399: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
74400:
74401: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
74402:
74403: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
74470: l_accrual_line_num := NULL; -- 4262811
74471: l_tmp_amt := NULL; -- 4262811
74472: --
74473:
74474: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
74475: l_balance_type_code <> 'B' THEN
74476: IF NVL(p_source_96,'
74477: ') = 'CLEAR_CLEAR' AND
74478: NVL(p_source_33,'
74552: --
74553: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
74554:
74555: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
74556: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
74557:
74558: -- 4955764
74559: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
74560: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
74628: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
74629:
74630: IF xla_accounting_cache_pkg.GetValueChar
74631: (p_source_code => 'LEDGER_CATEGORY_CODE'
74632: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
74633: AND l_bflow_method_code = 'PRIOR_ENTRY'
74634: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
74635: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
74636: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
74790: p_lookup_type => 'XLA_OWNER_TYPE'
74791: ,p_lookup_code => l_component_type_code
74792: )
74793: ,p_token_4 => 'PRODUCT_NAME'
74794: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74795: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74796: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74797: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74798: ,p_ae_header_id => NULL
74791: ,p_lookup_code => l_component_type_code
74792: )
74793: ,p_token_4 => 'PRODUCT_NAME'
74794: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74795: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74796: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74797: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74798: ,p_ae_header_id => NULL
74799: );
74792: )
74793: ,p_token_4 => 'PRODUCT_NAME'
74794: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74795: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74796: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74797: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74798: ,p_ae_header_id => NULL
74799: );
74800:
74793: ,p_token_4 => 'PRODUCT_NAME'
74794: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
74795: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
74796: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
74797: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
74798: ,p_ae_header_id => NULL
74799: );
74800:
74801: IF (C_LEVEL_ERROR>= g_log_level) THEN
74824: ----------------------------------------------------------------------------------
74825: -- 4219869 Business Flow
74826: -- Update journal entry status -- Need to generate this within IF
74827: ----------------------------------------------------------------------------------
74828: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
74829: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
74830: ,p_balance_type_code => l_balance_type_code
74831: );
74832:
74955:
74956: --
74957: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
74958: --
74959: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
74960: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
74961: ELSE
74962: ---------------------------------------------------------------------------------------------------
74963: -- 4262811a Switch Sign
74980:
74981: XLA_AE_LINES_PKG.ValidateCurrentLine;
74982: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
74983:
74984: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
74985: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
74986: ,p_balance_type_code => l_balance_type_code);
74987:
74988: END IF;
75136: l_tmp_amt NUMBER;
75137: l_acc_rev_natural_side_code VARCHAR2(1);
75138:
75139: l_num_entries NUMBER;
75140: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75141: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75142: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75143: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75144: l_recog_line_1 NUMBER;
75137: l_acc_rev_natural_side_code VARCHAR2(1);
75138:
75139: l_num_entries NUMBER;
75140: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75141: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75142: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75143: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75144: l_recog_line_1 NUMBER;
75145: l_recog_line_2 NUMBER;
75138:
75139: l_num_entries NUMBER;
75140: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75141: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75142: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75143: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75144: l_recog_line_1 NUMBER;
75145: l_recog_line_2 NUMBER;
75146:
75139: l_num_entries NUMBER;
75140: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75141: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75142: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75143: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75144: l_recog_line_1 NUMBER;
75145: l_recog_line_2 NUMBER;
75146:
75147: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
75145: l_recog_line_2 NUMBER;
75146:
75147: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
75148: l_bflow_applied_to_amt NUMBER; -- 5132302
75149: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
75150:
75151: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
75152:
75153: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
75220: l_accrual_line_num := NULL; -- 4262811
75221: l_tmp_amt := NULL; -- 4262811
75222: --
75223:
75224: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
75225: l_balance_type_code <> 'B' THEN
75226: IF NVL(p_source_96,'
75227: ') <> 'CLEAR_CLEAR' AND
75228: NVL(p_source_160,'
75302: --
75303: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
75304:
75305: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
75306: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
75307:
75308: -- 4955764
75309: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
75310: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
75378: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
75379:
75380: IF xla_accounting_cache_pkg.GetValueChar
75381: (p_source_code => 'LEDGER_CATEGORY_CODE'
75382: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
75383: AND l_bflow_method_code = 'PRIOR_ENTRY'
75384: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
75385: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
75386: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
75540: p_lookup_type => 'XLA_OWNER_TYPE'
75541: ,p_lookup_code => l_component_type_code
75542: )
75543: ,p_token_4 => 'PRODUCT_NAME'
75544: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
75545: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
75546: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
75547: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
75548: ,p_ae_header_id => NULL
75541: ,p_lookup_code => l_component_type_code
75542: )
75543: ,p_token_4 => 'PRODUCT_NAME'
75544: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
75545: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
75546: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
75547: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
75548: ,p_ae_header_id => NULL
75549: );
75542: )
75543: ,p_token_4 => 'PRODUCT_NAME'
75544: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
75545: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
75546: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
75547: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
75548: ,p_ae_header_id => NULL
75549: );
75550:
75543: ,p_token_4 => 'PRODUCT_NAME'
75544: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
75545: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
75546: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
75547: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
75548: ,p_ae_header_id => NULL
75549: );
75550:
75551: IF (C_LEVEL_ERROR>= g_log_level) THEN
75574: ----------------------------------------------------------------------------------
75575: -- 4219869 Business Flow
75576: -- Update journal entry status -- Need to generate this within IF
75577: ----------------------------------------------------------------------------------
75578: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
75579: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
75580: ,p_balance_type_code => l_balance_type_code
75581: );
75582:
75705:
75706: --
75707: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
75708: --
75709: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
75710: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
75711: ELSE
75712: ---------------------------------------------------------------------------------------------------
75713: -- 4262811a Switch Sign
75730:
75731: XLA_AE_LINES_PKG.ValidateCurrentLine;
75732: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
75733:
75734: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
75735: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
75736: ,p_balance_type_code => l_balance_type_code);
75737:
75738: END IF;
75903: l_tmp_amt NUMBER;
75904: l_acc_rev_natural_side_code VARCHAR2(1);
75905:
75906: l_num_entries NUMBER;
75907: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75908: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75909: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75910: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75911: l_recog_line_1 NUMBER;
75904: l_acc_rev_natural_side_code VARCHAR2(1);
75905:
75906: l_num_entries NUMBER;
75907: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75908: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75909: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75910: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75911: l_recog_line_1 NUMBER;
75912: l_recog_line_2 NUMBER;
75905:
75906: l_num_entries NUMBER;
75907: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75908: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75909: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75910: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75911: l_recog_line_1 NUMBER;
75912: l_recog_line_2 NUMBER;
75913:
75906: l_num_entries NUMBER;
75907: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
75908: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
75909: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
75910: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
75911: l_recog_line_1 NUMBER;
75912: l_recog_line_2 NUMBER;
75913:
75914: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
75912: l_recog_line_2 NUMBER;
75913:
75914: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
75915: l_bflow_applied_to_amt NUMBER; -- 5132302
75916: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
75917:
75918: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
75919:
75920: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
75987: l_accrual_line_num := NULL; -- 4262811
75988: l_tmp_amt := NULL; -- 4262811
75989: --
75990:
75991: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
75992: l_balance_type_code <> 'B' THEN
75993: IF NVL(p_source_33,'
75994: ') = 'IPV' AND
75995: NVL(p_source_95,'
76061: --
76062: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
76063:
76064: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
76065: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
76066:
76067: -- 4955764
76068: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
76069: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
76185: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
76186:
76187: IF xla_accounting_cache_pkg.GetValueChar
76188: (p_source_code => 'LEDGER_CATEGORY_CODE'
76189: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
76190: AND l_bflow_method_code = 'PRIOR_ENTRY'
76191: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
76192: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
76193: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
76295: p_lookup_type => 'XLA_OWNER_TYPE'
76296: ,p_lookup_code => l_component_type_code
76297: )
76298: ,p_token_4 => 'PRODUCT_NAME'
76299: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
76300: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
76301: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
76302: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
76303: ,p_ae_header_id => NULL
76296: ,p_lookup_code => l_component_type_code
76297: )
76298: ,p_token_4 => 'PRODUCT_NAME'
76299: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
76300: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
76301: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
76302: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
76303: ,p_ae_header_id => NULL
76304: );
76297: )
76298: ,p_token_4 => 'PRODUCT_NAME'
76299: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
76300: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
76301: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
76302: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
76303: ,p_ae_header_id => NULL
76304: );
76305:
76298: ,p_token_4 => 'PRODUCT_NAME'
76299: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
76300: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
76301: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
76302: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
76303: ,p_ae_header_id => NULL
76304: );
76305:
76306: IF (C_LEVEL_ERROR>= g_log_level) THEN
76329: ----------------------------------------------------------------------------------
76330: -- 4219869 Business Flow
76331: -- Update journal entry status -- Need to generate this within IF
76332: ----------------------------------------------------------------------------------
76333: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
76334: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
76335: ,p_balance_type_code => l_balance_type_code
76336: );
76337:
76416:
76417: --
76418: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
76419: --
76420: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
76421: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
76422: ELSE
76423: ---------------------------------------------------------------------------------------------------
76424: -- 4262811a Switch Sign
76441:
76442: XLA_AE_LINES_PKG.ValidateCurrentLine;
76443: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
76444:
76445: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
76446: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
76447: ,p_balance_type_code => l_balance_type_code);
76448:
76449: END IF;
76612: l_tmp_amt NUMBER;
76613: l_acc_rev_natural_side_code VARCHAR2(1);
76614:
76615: l_num_entries NUMBER;
76616: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
76617: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
76618: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
76619: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
76620: l_recog_line_1 NUMBER;
76613: l_acc_rev_natural_side_code VARCHAR2(1);
76614:
76615: l_num_entries NUMBER;
76616: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
76617: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
76618: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
76619: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
76620: l_recog_line_1 NUMBER;
76621: l_recog_line_2 NUMBER;
76614:
76615: l_num_entries NUMBER;
76616: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
76617: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
76618: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
76619: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
76620: l_recog_line_1 NUMBER;
76621: l_recog_line_2 NUMBER;
76622:
76615: l_num_entries NUMBER;
76616: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
76617: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
76618: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
76619: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
76620: l_recog_line_1 NUMBER;
76621: l_recog_line_2 NUMBER;
76622:
76623: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
76621: l_recog_line_2 NUMBER;
76622:
76623: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
76624: l_bflow_applied_to_amt NUMBER; -- 5132302
76625: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
76626:
76627: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
76628:
76629: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
76696: l_accrual_line_num := NULL; -- 4262811
76697: l_tmp_amt := NULL; -- 4262811
76698: --
76699:
76700: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
76701: l_balance_type_code <> 'B' THEN
76702: IF NVL(p_source_33,'
76703: ') = 'IPV' AND
76704: NVL(p_source_95,'
76770: --
76771: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
76772:
76773: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
76774: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
76775:
76776: -- 4955764
76777: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
76778: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
76892: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
76893:
76894: IF xla_accounting_cache_pkg.GetValueChar
76895: (p_source_code => 'LEDGER_CATEGORY_CODE'
76896: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
76897: AND l_bflow_method_code = 'PRIOR_ENTRY'
76898: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
76899: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
76900: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
77002: p_lookup_type => 'XLA_OWNER_TYPE'
77003: ,p_lookup_code => l_component_type_code
77004: )
77005: ,p_token_4 => 'PRODUCT_NAME'
77006: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77007: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77008: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77009: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77010: ,p_ae_header_id => NULL
77003: ,p_lookup_code => l_component_type_code
77004: )
77005: ,p_token_4 => 'PRODUCT_NAME'
77006: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77007: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77008: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77009: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77010: ,p_ae_header_id => NULL
77011: );
77004: )
77005: ,p_token_4 => 'PRODUCT_NAME'
77006: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77007: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77008: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77009: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77010: ,p_ae_header_id => NULL
77011: );
77012:
77005: ,p_token_4 => 'PRODUCT_NAME'
77006: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77007: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77008: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77009: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77010: ,p_ae_header_id => NULL
77011: );
77012:
77013: IF (C_LEVEL_ERROR>= g_log_level) THEN
77036: ----------------------------------------------------------------------------------
77037: -- 4219869 Business Flow
77038: -- Update journal entry status -- Need to generate this within IF
77039: ----------------------------------------------------------------------------------
77040: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
77041: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
77042: ,p_balance_type_code => l_balance_type_code
77043: );
77044:
77123:
77124: --
77125: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
77126: --
77127: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
77128: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
77129: ELSE
77130: ---------------------------------------------------------------------------------------------------
77131: -- 4262811a Switch Sign
77148:
77149: XLA_AE_LINES_PKG.ValidateCurrentLine;
77150: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
77151:
77152: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
77153: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
77154: ,p_balance_type_code => l_balance_type_code);
77155:
77156: END IF;
77321: l_tmp_amt NUMBER;
77322: l_acc_rev_natural_side_code VARCHAR2(1);
77323:
77324: l_num_entries NUMBER;
77325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
77326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
77327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
77328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
77329: l_recog_line_1 NUMBER;
77322: l_acc_rev_natural_side_code VARCHAR2(1);
77323:
77324: l_num_entries NUMBER;
77325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
77326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
77327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
77328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
77329: l_recog_line_1 NUMBER;
77330: l_recog_line_2 NUMBER;
77323:
77324: l_num_entries NUMBER;
77325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
77326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
77327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
77328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
77329: l_recog_line_1 NUMBER;
77330: l_recog_line_2 NUMBER;
77331:
77324: l_num_entries NUMBER;
77325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
77326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
77327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
77328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
77329: l_recog_line_1 NUMBER;
77330: l_recog_line_2 NUMBER;
77331:
77332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
77330: l_recog_line_2 NUMBER;
77331:
77332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
77333: l_bflow_applied_to_amt NUMBER; -- 5132302
77334: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
77335:
77336: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
77337:
77338: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
77405: l_accrual_line_num := NULL; -- 4262811
77406: l_tmp_amt := NULL; -- 4262811
77407: --
77408:
77409: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
77410: l_balance_type_code <> 'B' THEN
77411: IF NVL(p_source_33,'
77412: ') = 'IPV' AND
77413: NVL(p_source_95,'
77479: --
77480: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
77481:
77482: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
77483: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
77484:
77485: -- 4955764
77486: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
77487: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
77605: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
77606:
77607: IF xla_accounting_cache_pkg.GetValueChar
77608: (p_source_code => 'LEDGER_CATEGORY_CODE'
77609: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
77610: AND l_bflow_method_code = 'PRIOR_ENTRY'
77611: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
77612: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
77613: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
77715: p_lookup_type => 'XLA_OWNER_TYPE'
77716: ,p_lookup_code => l_component_type_code
77717: )
77718: ,p_token_4 => 'PRODUCT_NAME'
77719: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77720: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77721: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77722: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77723: ,p_ae_header_id => NULL
77716: ,p_lookup_code => l_component_type_code
77717: )
77718: ,p_token_4 => 'PRODUCT_NAME'
77719: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77720: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77721: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77722: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77723: ,p_ae_header_id => NULL
77724: );
77717: )
77718: ,p_token_4 => 'PRODUCT_NAME'
77719: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77720: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77721: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77722: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77723: ,p_ae_header_id => NULL
77724: );
77725:
77718: ,p_token_4 => 'PRODUCT_NAME'
77719: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
77720: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
77721: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
77722: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
77723: ,p_ae_header_id => NULL
77724: );
77725:
77726: IF (C_LEVEL_ERROR>= g_log_level) THEN
77749: ----------------------------------------------------------------------------------
77750: -- 4219869 Business Flow
77751: -- Update journal entry status -- Need to generate this within IF
77752: ----------------------------------------------------------------------------------
77753: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
77754: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
77755: ,p_balance_type_code => l_balance_type_code
77756: );
77757:
77836:
77837: --
77838: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
77839: --
77840: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
77841: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
77842: ELSE
77843: ---------------------------------------------------------------------------------------------------
77844: -- 4262811a Switch Sign
77861:
77862: XLA_AE_LINES_PKG.ValidateCurrentLine;
77863: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
77864:
77865: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
77866: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
77867: ,p_balance_type_code => l_balance_type_code);
77868:
77869: END IF;
78034: l_tmp_amt NUMBER;
78035: l_acc_rev_natural_side_code VARCHAR2(1);
78036:
78037: l_num_entries NUMBER;
78038: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78039: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78040: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78041: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78042: l_recog_line_1 NUMBER;
78035: l_acc_rev_natural_side_code VARCHAR2(1);
78036:
78037: l_num_entries NUMBER;
78038: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78039: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78040: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78041: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78042: l_recog_line_1 NUMBER;
78043: l_recog_line_2 NUMBER;
78036:
78037: l_num_entries NUMBER;
78038: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78039: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78040: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78041: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78042: l_recog_line_1 NUMBER;
78043: l_recog_line_2 NUMBER;
78044:
78037: l_num_entries NUMBER;
78038: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78039: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78040: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78041: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78042: l_recog_line_1 NUMBER;
78043: l_recog_line_2 NUMBER;
78044:
78045: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
78043: l_recog_line_2 NUMBER;
78044:
78045: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
78046: l_bflow_applied_to_amt NUMBER; -- 5132302
78047: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
78048:
78049: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
78050:
78051: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
78118: l_accrual_line_num := NULL; -- 4262811
78119: l_tmp_amt := NULL; -- 4262811
78120: --
78121:
78122: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
78123: l_balance_type_code <> 'B' THEN
78124: IF NVL(p_source_33,'
78125: ') = 'IPV' AND
78126: NVL(p_source_95,'
78192: --
78193: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
78194:
78195: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
78196: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
78197:
78198: -- 4955764
78199: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
78200: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
78316: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
78317:
78318: IF xla_accounting_cache_pkg.GetValueChar
78319: (p_source_code => 'LEDGER_CATEGORY_CODE'
78320: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
78321: AND l_bflow_method_code = 'PRIOR_ENTRY'
78322: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
78323: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
78324: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
78426: p_lookup_type => 'XLA_OWNER_TYPE'
78427: ,p_lookup_code => l_component_type_code
78428: )
78429: ,p_token_4 => 'PRODUCT_NAME'
78430: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
78431: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
78432: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
78433: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
78434: ,p_ae_header_id => NULL
78427: ,p_lookup_code => l_component_type_code
78428: )
78429: ,p_token_4 => 'PRODUCT_NAME'
78430: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
78431: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
78432: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
78433: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
78434: ,p_ae_header_id => NULL
78435: );
78428: )
78429: ,p_token_4 => 'PRODUCT_NAME'
78430: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
78431: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
78432: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
78433: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
78434: ,p_ae_header_id => NULL
78435: );
78436:
78429: ,p_token_4 => 'PRODUCT_NAME'
78430: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
78431: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
78432: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
78433: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
78434: ,p_ae_header_id => NULL
78435: );
78436:
78437: IF (C_LEVEL_ERROR>= g_log_level) THEN
78460: ----------------------------------------------------------------------------------
78461: -- 4219869 Business Flow
78462: -- Update journal entry status -- Need to generate this within IF
78463: ----------------------------------------------------------------------------------
78464: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
78465: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
78466: ,p_balance_type_code => l_balance_type_code
78467: );
78468:
78547:
78548: --
78549: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
78550: --
78551: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
78552: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
78553: ELSE
78554: ---------------------------------------------------------------------------------------------------
78555: -- 4262811a Switch Sign
78572:
78573: XLA_AE_LINES_PKG.ValidateCurrentLine;
78574: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
78575:
78576: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
78577: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
78578: ,p_balance_type_code => l_balance_type_code);
78579:
78580: END IF;
78747: l_tmp_amt NUMBER;
78748: l_acc_rev_natural_side_code VARCHAR2(1);
78749:
78750: l_num_entries NUMBER;
78751: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78752: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78753: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78754: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78755: l_recog_line_1 NUMBER;
78748: l_acc_rev_natural_side_code VARCHAR2(1);
78749:
78750: l_num_entries NUMBER;
78751: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78752: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78753: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78754: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78755: l_recog_line_1 NUMBER;
78756: l_recog_line_2 NUMBER;
78749:
78750: l_num_entries NUMBER;
78751: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78752: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78753: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78754: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78755: l_recog_line_1 NUMBER;
78756: l_recog_line_2 NUMBER;
78757:
78750: l_num_entries NUMBER;
78751: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
78752: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
78753: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
78754: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
78755: l_recog_line_1 NUMBER;
78756: l_recog_line_2 NUMBER;
78757:
78758: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
78756: l_recog_line_2 NUMBER;
78757:
78758: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
78759: l_bflow_applied_to_amt NUMBER; -- 5132302
78760: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
78761:
78762: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
78763:
78764: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
78831: l_accrual_line_num := NULL; -- 4262811
78832: l_tmp_amt := NULL; -- 4262811
78833: --
78834:
78835: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
78836: l_balance_type_code <> 'B' THEN
78837: IF NVL(p_source_33,'
78838: ') = 'RETROEXPENSE' OR
78839: NVL(p_source_33,'
78913: --
78914: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
78915:
78916: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
78917: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
78918:
78919: -- 4955764
78920: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
78921: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
79037: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
79038:
79039: IF xla_accounting_cache_pkg.GetValueChar
79040: (p_source_code => 'LEDGER_CATEGORY_CODE'
79041: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
79042: AND l_bflow_method_code = 'PRIOR_ENTRY'
79043: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
79044: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
79045: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
79166: p_lookup_type => 'XLA_OWNER_TYPE'
79167: ,p_lookup_code => l_component_type_code
79168: )
79169: ,p_token_4 => 'PRODUCT_NAME'
79170: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79171: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79172: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79173: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79174: ,p_ae_header_id => NULL
79167: ,p_lookup_code => l_component_type_code
79168: )
79169: ,p_token_4 => 'PRODUCT_NAME'
79170: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79171: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79172: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79173: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79174: ,p_ae_header_id => NULL
79175: );
79168: )
79169: ,p_token_4 => 'PRODUCT_NAME'
79170: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79171: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79172: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79173: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79174: ,p_ae_header_id => NULL
79175: );
79176:
79169: ,p_token_4 => 'PRODUCT_NAME'
79170: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79171: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79172: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79173: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79174: ,p_ae_header_id => NULL
79175: );
79176:
79177: IF (C_LEVEL_ERROR>= g_log_level) THEN
79200: ----------------------------------------------------------------------------------
79201: -- 4219869 Business Flow
79202: -- Update journal entry status -- Need to generate this within IF
79203: ----------------------------------------------------------------------------------
79204: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
79205: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
79206: ,p_balance_type_code => l_balance_type_code
79207: );
79208:
79287:
79288: --
79289: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
79290: --
79291: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
79292: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
79293: ELSE
79294: ---------------------------------------------------------------------------------------------------
79295: -- 4262811a Switch Sign
79312:
79313: XLA_AE_LINES_PKG.ValidateCurrentLine;
79314: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
79315:
79316: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
79317: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
79318: ,p_balance_type_code => l_balance_type_code);
79319:
79320: END IF;
79485: l_tmp_amt NUMBER;
79486: l_acc_rev_natural_side_code VARCHAR2(1);
79487:
79488: l_num_entries NUMBER;
79489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
79490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
79491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
79492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
79493: l_recog_line_1 NUMBER;
79486: l_acc_rev_natural_side_code VARCHAR2(1);
79487:
79488: l_num_entries NUMBER;
79489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
79490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
79491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
79492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
79493: l_recog_line_1 NUMBER;
79494: l_recog_line_2 NUMBER;
79487:
79488: l_num_entries NUMBER;
79489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
79490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
79491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
79492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
79493: l_recog_line_1 NUMBER;
79494: l_recog_line_2 NUMBER;
79495:
79488: l_num_entries NUMBER;
79489: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
79490: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
79491: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
79492: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
79493: l_recog_line_1 NUMBER;
79494: l_recog_line_2 NUMBER;
79495:
79496: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
79494: l_recog_line_2 NUMBER;
79495:
79496: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
79497: l_bflow_applied_to_amt NUMBER; -- 5132302
79498: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
79499:
79500: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
79501:
79502: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
79569: l_accrual_line_num := NULL; -- 4262811
79570: l_tmp_amt := NULL; -- 4262811
79571: --
79572:
79573: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
79574: l_balance_type_code <> 'B' THEN
79575: IF NVL(p_source_33,'
79576: ') = 'RETROEXPENSE' OR
79577: NVL(p_source_33,'
79651: --
79652: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
79653:
79654: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
79655: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
79656:
79657: -- 4955764
79658: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
79659: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
79773: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
79774:
79775: IF xla_accounting_cache_pkg.GetValueChar
79776: (p_source_code => 'LEDGER_CATEGORY_CODE'
79777: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
79778: AND l_bflow_method_code = 'PRIOR_ENTRY'
79779: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
79780: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
79781: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
79902: p_lookup_type => 'XLA_OWNER_TYPE'
79903: ,p_lookup_code => l_component_type_code
79904: )
79905: ,p_token_4 => 'PRODUCT_NAME'
79906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79910: ,p_ae_header_id => NULL
79903: ,p_lookup_code => l_component_type_code
79904: )
79905: ,p_token_4 => 'PRODUCT_NAME'
79906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79910: ,p_ae_header_id => NULL
79911: );
79904: )
79905: ,p_token_4 => 'PRODUCT_NAME'
79906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79910: ,p_ae_header_id => NULL
79911: );
79912:
79905: ,p_token_4 => 'PRODUCT_NAME'
79906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
79907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
79908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
79909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
79910: ,p_ae_header_id => NULL
79911: );
79912:
79913: IF (C_LEVEL_ERROR>= g_log_level) THEN
79936: ----------------------------------------------------------------------------------
79937: -- 4219869 Business Flow
79938: -- Update journal entry status -- Need to generate this within IF
79939: ----------------------------------------------------------------------------------
79940: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
79941: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
79942: ,p_balance_type_code => l_balance_type_code
79943: );
79944:
80023:
80024: --
80025: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
80026: --
80027: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
80028: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
80029: ELSE
80030: ---------------------------------------------------------------------------------------------------
80031: -- 4262811a Switch Sign
80048:
80049: XLA_AE_LINES_PKG.ValidateCurrentLine;
80050: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
80051:
80052: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
80053: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
80054: ,p_balance_type_code => l_balance_type_code);
80055:
80056: END IF;
80223: l_tmp_amt NUMBER;
80224: l_acc_rev_natural_side_code VARCHAR2(1);
80225:
80226: l_num_entries NUMBER;
80227: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80228: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80229: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80230: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80231: l_recog_line_1 NUMBER;
80224: l_acc_rev_natural_side_code VARCHAR2(1);
80225:
80226: l_num_entries NUMBER;
80227: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80228: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80229: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80230: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80231: l_recog_line_1 NUMBER;
80232: l_recog_line_2 NUMBER;
80225:
80226: l_num_entries NUMBER;
80227: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80228: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80229: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80230: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80231: l_recog_line_1 NUMBER;
80232: l_recog_line_2 NUMBER;
80233:
80226: l_num_entries NUMBER;
80227: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80228: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80229: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80230: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80231: l_recog_line_1 NUMBER;
80232: l_recog_line_2 NUMBER;
80233:
80234: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
80232: l_recog_line_2 NUMBER;
80233:
80234: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
80235: l_bflow_applied_to_amt NUMBER; -- 5132302
80236: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
80237:
80238: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
80239:
80240: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
80307: l_accrual_line_num := NULL; -- 4262811
80308: l_tmp_amt := NULL; -- 4262811
80309: --
80310:
80311: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
80312: l_balance_type_code <> 'B' THEN
80313: IF NVL(p_source_33,'
80314: ') = 'RETROEXPENSE' OR
80315: NVL(p_source_33,'
80389: --
80390: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
80391:
80392: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
80393: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
80394:
80395: -- 4955764
80396: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
80397: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
80515: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
80516:
80517: IF xla_accounting_cache_pkg.GetValueChar
80518: (p_source_code => 'LEDGER_CATEGORY_CODE'
80519: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
80520: AND l_bflow_method_code = 'PRIOR_ENTRY'
80521: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
80522: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
80523: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
80644: p_lookup_type => 'XLA_OWNER_TYPE'
80645: ,p_lookup_code => l_component_type_code
80646: )
80647: ,p_token_4 => 'PRODUCT_NAME'
80648: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
80649: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
80650: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
80651: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
80652: ,p_ae_header_id => NULL
80645: ,p_lookup_code => l_component_type_code
80646: )
80647: ,p_token_4 => 'PRODUCT_NAME'
80648: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
80649: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
80650: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
80651: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
80652: ,p_ae_header_id => NULL
80653: );
80646: )
80647: ,p_token_4 => 'PRODUCT_NAME'
80648: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
80649: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
80650: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
80651: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
80652: ,p_ae_header_id => NULL
80653: );
80654:
80647: ,p_token_4 => 'PRODUCT_NAME'
80648: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
80649: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
80650: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
80651: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
80652: ,p_ae_header_id => NULL
80653: );
80654:
80655: IF (C_LEVEL_ERROR>= g_log_level) THEN
80678: ----------------------------------------------------------------------------------
80679: -- 4219869 Business Flow
80680: -- Update journal entry status -- Need to generate this within IF
80681: ----------------------------------------------------------------------------------
80682: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
80683: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
80684: ,p_balance_type_code => l_balance_type_code
80685: );
80686:
80765:
80766: --
80767: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
80768: --
80769: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
80770: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
80771: ELSE
80772: ---------------------------------------------------------------------------------------------------
80773: -- 4262811a Switch Sign
80790:
80791: XLA_AE_LINES_PKG.ValidateCurrentLine;
80792: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
80793:
80794: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
80795: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
80796: ,p_balance_type_code => l_balance_type_code);
80797:
80798: END IF;
80925: l_tmp_amt NUMBER;
80926: l_acc_rev_natural_side_code VARCHAR2(1);
80927:
80928: l_num_entries NUMBER;
80929: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80930: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80931: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80932: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80933: l_recog_line_1 NUMBER;
80926: l_acc_rev_natural_side_code VARCHAR2(1);
80927:
80928: l_num_entries NUMBER;
80929: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80930: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80931: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80932: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80933: l_recog_line_1 NUMBER;
80934: l_recog_line_2 NUMBER;
80927:
80928: l_num_entries NUMBER;
80929: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80930: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80931: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80932: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80933: l_recog_line_1 NUMBER;
80934: l_recog_line_2 NUMBER;
80935:
80928: l_num_entries NUMBER;
80929: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
80930: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
80931: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
80932: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
80933: l_recog_line_1 NUMBER;
80934: l_recog_line_2 NUMBER;
80935:
80936: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
80934: l_recog_line_2 NUMBER;
80935:
80936: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
80937: l_bflow_applied_to_amt NUMBER; -- 5132302
80938: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
80939:
80940: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
80941:
80942: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
81009: l_accrual_line_num := NULL; -- 4262811
81010: l_tmp_amt := NULL; -- 4262811
81011: --
81012:
81013: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
81014: l_balance_type_code <> 'B' THEN
81015: IF NVL(p_source_96,'
81016: ') = 'CLEAR_CLEAR' AND
81017: NVL(p_source_160,'
81089: --
81090: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
81091:
81092: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
81093: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
81094:
81095: -- 4955764
81096: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
81097: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
81155: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
81156:
81157: IF xla_accounting_cache_pkg.GetValueChar
81158: (p_source_code => 'LEDGER_CATEGORY_CODE'
81159: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
81160: AND l_bflow_method_code = 'PRIOR_ENTRY'
81161: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
81162: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
81163: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
81232: p_lookup_type => 'XLA_OWNER_TYPE'
81233: ,p_lookup_code => l_component_type_code
81234: )
81235: ,p_token_4 => 'PRODUCT_NAME'
81236: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81237: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81238: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81239: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81240: ,p_ae_header_id => NULL
81233: ,p_lookup_code => l_component_type_code
81234: )
81235: ,p_token_4 => 'PRODUCT_NAME'
81236: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81237: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81238: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81239: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81240: ,p_ae_header_id => NULL
81241: );
81234: )
81235: ,p_token_4 => 'PRODUCT_NAME'
81236: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81237: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81238: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81239: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81240: ,p_ae_header_id => NULL
81241: );
81242:
81235: ,p_token_4 => 'PRODUCT_NAME'
81236: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81237: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81238: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81239: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81240: ,p_ae_header_id => NULL
81241: );
81242:
81243: IF (C_LEVEL_ERROR>= g_log_level) THEN
81266: ----------------------------------------------------------------------------------
81267: -- 4219869 Business Flow
81268: -- Update journal entry status -- Need to generate this within IF
81269: ----------------------------------------------------------------------------------
81270: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
81271: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
81272: ,p_balance_type_code => l_balance_type_code
81273: );
81274:
81327:
81328: --
81329: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
81330: --
81331: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
81332: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
81333: ELSE
81334: ---------------------------------------------------------------------------------------------------
81335: -- 4262811a Switch Sign
81352:
81353: XLA_AE_LINES_PKG.ValidateCurrentLine;
81354: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
81355:
81356: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
81357: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
81358: ,p_balance_type_code => l_balance_type_code);
81359:
81360: END IF;
81493: l_tmp_amt NUMBER;
81494: l_acc_rev_natural_side_code VARCHAR2(1);
81495:
81496: l_num_entries NUMBER;
81497: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
81498: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
81499: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
81500: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
81501: l_recog_line_1 NUMBER;
81494: l_acc_rev_natural_side_code VARCHAR2(1);
81495:
81496: l_num_entries NUMBER;
81497: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
81498: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
81499: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
81500: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
81501: l_recog_line_1 NUMBER;
81502: l_recog_line_2 NUMBER;
81495:
81496: l_num_entries NUMBER;
81497: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
81498: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
81499: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
81500: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
81501: l_recog_line_1 NUMBER;
81502: l_recog_line_2 NUMBER;
81503:
81496: l_num_entries NUMBER;
81497: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
81498: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
81499: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
81500: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
81501: l_recog_line_1 NUMBER;
81502: l_recog_line_2 NUMBER;
81503:
81504: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
81502: l_recog_line_2 NUMBER;
81503:
81504: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
81505: l_bflow_applied_to_amt NUMBER; -- 5132302
81506: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
81507:
81508: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
81509:
81510: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
81577: l_accrual_line_num := NULL; -- 4262811
81578: l_tmp_amt := NULL; -- 4262811
81579: --
81580:
81581: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
81582: l_balance_type_code <> 'B' THEN
81583: IF NVL(p_source_96,'
81584: ') <> 'CLEAR_CLEAR' AND
81585: NVL(p_source_160,'
81659: --
81660: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
81661:
81662: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
81663: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
81664:
81665: -- 4955764
81666: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
81667: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
81725: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
81726:
81727: IF xla_accounting_cache_pkg.GetValueChar
81728: (p_source_code => 'LEDGER_CATEGORY_CODE'
81729: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
81730: AND l_bflow_method_code = 'PRIOR_ENTRY'
81731: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
81732: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
81733: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
81802: p_lookup_type => 'XLA_OWNER_TYPE'
81803: ,p_lookup_code => l_component_type_code
81804: )
81805: ,p_token_4 => 'PRODUCT_NAME'
81806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81810: ,p_ae_header_id => NULL
81803: ,p_lookup_code => l_component_type_code
81804: )
81805: ,p_token_4 => 'PRODUCT_NAME'
81806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81810: ,p_ae_header_id => NULL
81811: );
81804: )
81805: ,p_token_4 => 'PRODUCT_NAME'
81806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81810: ,p_ae_header_id => NULL
81811: );
81812:
81805: ,p_token_4 => 'PRODUCT_NAME'
81806: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
81807: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
81808: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
81809: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
81810: ,p_ae_header_id => NULL
81811: );
81812:
81813: IF (C_LEVEL_ERROR>= g_log_level) THEN
81836: ----------------------------------------------------------------------------------
81837: -- 4219869 Business Flow
81838: -- Update journal entry status -- Need to generate this within IF
81839: ----------------------------------------------------------------------------------
81840: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
81841: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
81842: ,p_balance_type_code => l_balance_type_code
81843: );
81844:
81897:
81898: --
81899: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
81900: --
81901: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
81902: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
81903: ELSE
81904: ---------------------------------------------------------------------------------------------------
81905: -- 4262811a Switch Sign
81922:
81923: XLA_AE_LINES_PKG.ValidateCurrentLine;
81924: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
81925:
81926: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
81927: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
81928: ,p_balance_type_code => l_balance_type_code);
81929:
81930: END IF;
82051: l_tmp_amt NUMBER;
82052: l_acc_rev_natural_side_code VARCHAR2(1);
82053:
82054: l_num_entries NUMBER;
82055: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82056: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82057: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82058: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82059: l_recog_line_1 NUMBER;
82052: l_acc_rev_natural_side_code VARCHAR2(1);
82053:
82054: l_num_entries NUMBER;
82055: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82056: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82057: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82058: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82059: l_recog_line_1 NUMBER;
82060: l_recog_line_2 NUMBER;
82053:
82054: l_num_entries NUMBER;
82055: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82056: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82057: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82058: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82059: l_recog_line_1 NUMBER;
82060: l_recog_line_2 NUMBER;
82061:
82054: l_num_entries NUMBER;
82055: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82056: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82057: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82058: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82059: l_recog_line_1 NUMBER;
82060: l_recog_line_2 NUMBER;
82061:
82062: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
82060: l_recog_line_2 NUMBER;
82061:
82062: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
82063: l_bflow_applied_to_amt NUMBER; -- 5132302
82064: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
82065:
82066: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
82067:
82068: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
82135: l_accrual_line_num := NULL; -- 4262811
82136: l_tmp_amt := NULL; -- 4262811
82137: --
82138:
82139: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
82140: l_balance_type_code <> 'B' THEN
82141: IF NVL(p_source_96,'
82142: ') = 'CLEAR_CLEAR' AND
82143: NVL(p_source_160,'
82215: --
82216: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
82217:
82218: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
82219: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
82220:
82221: -- 4955764
82222: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
82223: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
82281: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
82282:
82283: IF xla_accounting_cache_pkg.GetValueChar
82284: (p_source_code => 'LEDGER_CATEGORY_CODE'
82285: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
82286: AND l_bflow_method_code = 'PRIOR_ENTRY'
82287: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
82288: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
82289: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
82358: p_lookup_type => 'XLA_OWNER_TYPE'
82359: ,p_lookup_code => l_component_type_code
82360: )
82361: ,p_token_4 => 'PRODUCT_NAME'
82362: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
82363: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
82364: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
82365: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
82366: ,p_ae_header_id => NULL
82359: ,p_lookup_code => l_component_type_code
82360: )
82361: ,p_token_4 => 'PRODUCT_NAME'
82362: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
82363: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
82364: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
82365: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
82366: ,p_ae_header_id => NULL
82367: );
82360: )
82361: ,p_token_4 => 'PRODUCT_NAME'
82362: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
82363: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
82364: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
82365: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
82366: ,p_ae_header_id => NULL
82367: );
82368:
82361: ,p_token_4 => 'PRODUCT_NAME'
82362: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
82363: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
82364: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
82365: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
82366: ,p_ae_header_id => NULL
82367: );
82368:
82369: IF (C_LEVEL_ERROR>= g_log_level) THEN
82392: ----------------------------------------------------------------------------------
82393: -- 4219869 Business Flow
82394: -- Update journal entry status -- Need to generate this within IF
82395: ----------------------------------------------------------------------------------
82396: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
82397: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
82398: ,p_balance_type_code => l_balance_type_code
82399: );
82400:
82453:
82454: --
82455: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
82456: --
82457: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
82458: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
82459: ELSE
82460: ---------------------------------------------------------------------------------------------------
82461: -- 4262811a Switch Sign
82478:
82479: XLA_AE_LINES_PKG.ValidateCurrentLine;
82480: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
82481:
82482: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
82483: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
82484: ,p_balance_type_code => l_balance_type_code);
82485:
82486: END IF;
82653: l_tmp_amt NUMBER;
82654: l_acc_rev_natural_side_code VARCHAR2(1);
82655:
82656: l_num_entries NUMBER;
82657: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82658: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82659: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82660: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82661: l_recog_line_1 NUMBER;
82654: l_acc_rev_natural_side_code VARCHAR2(1);
82655:
82656: l_num_entries NUMBER;
82657: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82658: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82659: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82660: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82661: l_recog_line_1 NUMBER;
82662: l_recog_line_2 NUMBER;
82655:
82656: l_num_entries NUMBER;
82657: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82658: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82659: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82660: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82661: l_recog_line_1 NUMBER;
82662: l_recog_line_2 NUMBER;
82663:
82656: l_num_entries NUMBER;
82657: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
82658: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
82659: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
82660: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
82661: l_recog_line_1 NUMBER;
82662: l_recog_line_2 NUMBER;
82663:
82664: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
82662: l_recog_line_2 NUMBER;
82663:
82664: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
82665: l_bflow_applied_to_amt NUMBER; -- 5132302
82666: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
82667:
82668: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
82669:
82670: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
82737: l_accrual_line_num := NULL; -- 4262811
82738: l_tmp_amt := NULL; -- 4262811
82739: --
82740:
82741: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
82742: l_balance_type_code <> 'B' THEN
82743: IF (NVL(p_source_15,'
82744: ') <> 'BALANCING_SEGMENT' AND
82745: NVL(p_source_15,'
82813: --
82814: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
82815:
82816: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
82817: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
82818:
82819: -- 4955764
82820: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
82821: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
82937: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
82938:
82939: IF xla_accounting_cache_pkg.GetValueChar
82940: (p_source_code => 'LEDGER_CATEGORY_CODE'
82941: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
82942: AND l_bflow_method_code = 'PRIOR_ENTRY'
82943: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
82944: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
82945: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
83068: p_lookup_type => 'XLA_OWNER_TYPE'
83069: ,p_lookup_code => l_component_type_code
83070: )
83071: ,p_token_4 => 'PRODUCT_NAME'
83072: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83073: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83074: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83075: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83076: ,p_ae_header_id => NULL
83069: ,p_lookup_code => l_component_type_code
83070: )
83071: ,p_token_4 => 'PRODUCT_NAME'
83072: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83073: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83074: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83075: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83076: ,p_ae_header_id => NULL
83077: );
83070: )
83071: ,p_token_4 => 'PRODUCT_NAME'
83072: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83073: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83074: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83075: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83076: ,p_ae_header_id => NULL
83077: );
83078:
83071: ,p_token_4 => 'PRODUCT_NAME'
83072: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83073: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83074: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83075: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83076: ,p_ae_header_id => NULL
83077: );
83078:
83079: IF (C_LEVEL_ERROR>= g_log_level) THEN
83102: ----------------------------------------------------------------------------------
83103: -- 4219869 Business Flow
83104: -- Update journal entry status -- Need to generate this within IF
83105: ----------------------------------------------------------------------------------
83106: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
83107: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
83108: ,p_balance_type_code => l_balance_type_code
83109: );
83110:
83189:
83190: --
83191: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
83192: --
83193: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
83194: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
83195: ELSE
83196: ---------------------------------------------------------------------------------------------------
83197: -- 4262811a Switch Sign
83214:
83215: XLA_AE_LINES_PKG.ValidateCurrentLine;
83216: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
83217:
83218: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
83219: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
83220: ,p_balance_type_code => l_balance_type_code);
83221:
83222: END IF;
83389: l_tmp_amt NUMBER;
83390: l_acc_rev_natural_side_code VARCHAR2(1);
83391:
83392: l_num_entries NUMBER;
83393: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
83394: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
83395: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
83396: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
83397: l_recog_line_1 NUMBER;
83390: l_acc_rev_natural_side_code VARCHAR2(1);
83391:
83392: l_num_entries NUMBER;
83393: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
83394: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
83395: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
83396: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
83397: l_recog_line_1 NUMBER;
83398: l_recog_line_2 NUMBER;
83391:
83392: l_num_entries NUMBER;
83393: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
83394: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
83395: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
83396: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
83397: l_recog_line_1 NUMBER;
83398: l_recog_line_2 NUMBER;
83399:
83392: l_num_entries NUMBER;
83393: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
83394: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
83395: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
83396: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
83397: l_recog_line_1 NUMBER;
83398: l_recog_line_2 NUMBER;
83399:
83400: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
83398: l_recog_line_2 NUMBER;
83399:
83400: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
83401: l_bflow_applied_to_amt NUMBER; -- 5132302
83402: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
83403:
83404: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
83405:
83406: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
83473: l_accrual_line_num := NULL; -- 4262811
83474: l_tmp_amt := NULL; -- 4262811
83475: --
83476:
83477: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
83478: l_balance_type_code <> 'B' THEN
83479: IF NVL(p_source_15,'
83480: ') = 'ACCOUNT_SEGMENT_VALUE' AND
83481: NVL(p_source_135,'
83547: --
83548: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
83549:
83550: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
83551: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
83552:
83553: -- 4955764
83554: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
83555: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
83671: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
83672:
83673: IF xla_accounting_cache_pkg.GetValueChar
83674: (p_source_code => 'LEDGER_CATEGORY_CODE'
83675: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
83676: AND l_bflow_method_code = 'PRIOR_ENTRY'
83677: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
83678: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
83679: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
83872: p_lookup_type => 'XLA_OWNER_TYPE'
83873: ,p_lookup_code => l_component_type_code
83874: )
83875: ,p_token_4 => 'PRODUCT_NAME'
83876: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83877: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83878: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83879: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83880: ,p_ae_header_id => NULL
83873: ,p_lookup_code => l_component_type_code
83874: )
83875: ,p_token_4 => 'PRODUCT_NAME'
83876: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83877: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83878: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83879: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83880: ,p_ae_header_id => NULL
83881: );
83874: )
83875: ,p_token_4 => 'PRODUCT_NAME'
83876: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83877: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83878: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83879: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83880: ,p_ae_header_id => NULL
83881: );
83882:
83875: ,p_token_4 => 'PRODUCT_NAME'
83876: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
83877: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
83878: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
83879: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
83880: ,p_ae_header_id => NULL
83881: );
83882:
83883: IF (C_LEVEL_ERROR>= g_log_level) THEN
83906: ----------------------------------------------------------------------------------
83907: -- 4219869 Business Flow
83908: -- Update journal entry status -- Need to generate this within IF
83909: ----------------------------------------------------------------------------------
83910: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
83911: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
83912: ,p_balance_type_code => l_balance_type_code
83913: );
83914:
84060:
84061: --
84062: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
84063: --
84064: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
84065: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
84066: ELSE
84067: ---------------------------------------------------------------------------------------------------
84068: -- 4262811a Switch Sign
84085:
84086: XLA_AE_LINES_PKG.ValidateCurrentLine;
84087: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
84088:
84089: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
84090: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
84091: ,p_balance_type_code => l_balance_type_code);
84092:
84093: END IF;
84260: l_tmp_amt NUMBER;
84261: l_acc_rev_natural_side_code VARCHAR2(1);
84262:
84263: l_num_entries NUMBER;
84264: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
84265: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
84266: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
84267: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
84268: l_recog_line_1 NUMBER;
84261: l_acc_rev_natural_side_code VARCHAR2(1);
84262:
84263: l_num_entries NUMBER;
84264: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
84265: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
84266: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
84267: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
84268: l_recog_line_1 NUMBER;
84269: l_recog_line_2 NUMBER;
84262:
84263: l_num_entries NUMBER;
84264: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
84265: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
84266: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
84267: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
84268: l_recog_line_1 NUMBER;
84269: l_recog_line_2 NUMBER;
84270:
84263: l_num_entries NUMBER;
84264: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
84265: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
84266: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
84267: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
84268: l_recog_line_1 NUMBER;
84269: l_recog_line_2 NUMBER;
84270:
84271: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
84269: l_recog_line_2 NUMBER;
84270:
84271: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
84272: l_bflow_applied_to_amt NUMBER; -- 5132302
84273: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
84274:
84275: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
84276:
84277: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
84344: l_accrual_line_num := NULL; -- 4262811
84345: l_tmp_amt := NULL; -- 4262811
84346: --
84347:
84348: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
84349: l_balance_type_code <> 'B' THEN
84350: IF NVL(p_source_15,'
84351: ') = 'BALANCING_SEGMENT' AND
84352: NVL(p_source_135,'
84418: --
84419: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
84420:
84421: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
84422: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
84423:
84424: -- 4955764
84425: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
84426: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
84542: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
84543:
84544: IF xla_accounting_cache_pkg.GetValueChar
84545: (p_source_code => 'LEDGER_CATEGORY_CODE'
84546: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
84547: AND l_bflow_method_code = 'PRIOR_ENTRY'
84548: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
84549: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
84550: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
84700: p_lookup_type => 'XLA_OWNER_TYPE'
84701: ,p_lookup_code => l_component_type_code
84702: )
84703: ,p_token_4 => 'PRODUCT_NAME'
84704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
84705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
84706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
84707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
84708: ,p_ae_header_id => NULL
84701: ,p_lookup_code => l_component_type_code
84702: )
84703: ,p_token_4 => 'PRODUCT_NAME'
84704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
84705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
84706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
84707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
84708: ,p_ae_header_id => NULL
84709: );
84702: )
84703: ,p_token_4 => 'PRODUCT_NAME'
84704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
84705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
84706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
84707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
84708: ,p_ae_header_id => NULL
84709: );
84710:
84703: ,p_token_4 => 'PRODUCT_NAME'
84704: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
84705: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
84706: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
84707: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
84708: ,p_ae_header_id => NULL
84709: );
84710:
84711: IF (C_LEVEL_ERROR>= g_log_level) THEN
84734: ----------------------------------------------------------------------------------
84735: -- 4219869 Business Flow
84736: -- Update journal entry status -- Need to generate this within IF
84737: ----------------------------------------------------------------------------------
84738: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
84739: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
84740: ,p_balance_type_code => l_balance_type_code
84741: );
84742:
84845:
84846: --
84847: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
84848: --
84849: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
84850: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
84851: ELSE
84852: ---------------------------------------------------------------------------------------------------
84853: -- 4262811a Switch Sign
84870:
84871: XLA_AE_LINES_PKG.ValidateCurrentLine;
84872: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
84873:
84874: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
84875: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
84876: ,p_balance_type_code => l_balance_type_code);
84877:
84878: END IF;
85043: l_tmp_amt NUMBER;
85044: l_acc_rev_natural_side_code VARCHAR2(1);
85045:
85046: l_num_entries NUMBER;
85047: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85048: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85049: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85050: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85051: l_recog_line_1 NUMBER;
85044: l_acc_rev_natural_side_code VARCHAR2(1);
85045:
85046: l_num_entries NUMBER;
85047: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85048: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85049: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85050: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85051: l_recog_line_1 NUMBER;
85052: l_recog_line_2 NUMBER;
85045:
85046: l_num_entries NUMBER;
85047: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85048: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85049: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85050: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85051: l_recog_line_1 NUMBER;
85052: l_recog_line_2 NUMBER;
85053:
85046: l_num_entries NUMBER;
85047: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85048: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85049: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85050: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85051: l_recog_line_1 NUMBER;
85052: l_recog_line_2 NUMBER;
85053:
85054: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
85052: l_recog_line_2 NUMBER;
85053:
85054: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
85055: l_bflow_applied_to_amt NUMBER; -- 5132302
85056: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
85057:
85058: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
85059:
85060: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
85127: l_accrual_line_num := NULL; -- 4262811
85128: l_tmp_amt := NULL; -- 4262811
85129: --
85130:
85131: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
85132: l_balance_type_code <> 'B' THEN
85133: IF (NVL(p_source_15,'
85134: ') <> 'BALANCING_SEGMENT' AND
85135: NVL(p_source_15,'
85203: --
85204: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
85205:
85206: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
85207: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
85208:
85209: -- 4955764
85210: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
85211: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
85325: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
85326:
85327: IF xla_accounting_cache_pkg.GetValueChar
85328: (p_source_code => 'LEDGER_CATEGORY_CODE'
85329: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
85330: AND l_bflow_method_code = 'PRIOR_ENTRY'
85331: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
85332: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
85333: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
85456: p_lookup_type => 'XLA_OWNER_TYPE'
85457: ,p_lookup_code => l_component_type_code
85458: )
85459: ,p_token_4 => 'PRODUCT_NAME'
85460: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
85461: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
85462: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
85463: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
85464: ,p_ae_header_id => NULL
85457: ,p_lookup_code => l_component_type_code
85458: )
85459: ,p_token_4 => 'PRODUCT_NAME'
85460: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
85461: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
85462: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
85463: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
85464: ,p_ae_header_id => NULL
85465: );
85458: )
85459: ,p_token_4 => 'PRODUCT_NAME'
85460: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
85461: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
85462: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
85463: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
85464: ,p_ae_header_id => NULL
85465: );
85466:
85459: ,p_token_4 => 'PRODUCT_NAME'
85460: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
85461: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
85462: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
85463: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
85464: ,p_ae_header_id => NULL
85465: );
85466:
85467: IF (C_LEVEL_ERROR>= g_log_level) THEN
85490: ----------------------------------------------------------------------------------
85491: -- 4219869 Business Flow
85492: -- Update journal entry status -- Need to generate this within IF
85493: ----------------------------------------------------------------------------------
85494: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
85495: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
85496: ,p_balance_type_code => l_balance_type_code
85497: );
85498:
85577:
85578: --
85579: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
85580: --
85581: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
85582: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
85583: ELSE
85584: ---------------------------------------------------------------------------------------------------
85585: -- 4262811a Switch Sign
85602:
85603: XLA_AE_LINES_PKG.ValidateCurrentLine;
85604: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
85605:
85606: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
85607: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
85608: ,p_balance_type_code => l_balance_type_code);
85609:
85610: END IF;
85775: l_tmp_amt NUMBER;
85776: l_acc_rev_natural_side_code VARCHAR2(1);
85777:
85778: l_num_entries NUMBER;
85779: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85780: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85781: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85782: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85783: l_recog_line_1 NUMBER;
85776: l_acc_rev_natural_side_code VARCHAR2(1);
85777:
85778: l_num_entries NUMBER;
85779: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85780: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85781: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85782: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85783: l_recog_line_1 NUMBER;
85784: l_recog_line_2 NUMBER;
85777:
85778: l_num_entries NUMBER;
85779: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85780: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85781: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85782: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85783: l_recog_line_1 NUMBER;
85784: l_recog_line_2 NUMBER;
85785:
85778: l_num_entries NUMBER;
85779: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
85780: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
85781: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
85782: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
85783: l_recog_line_1 NUMBER;
85784: l_recog_line_2 NUMBER;
85785:
85786: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
85784: l_recog_line_2 NUMBER;
85785:
85786: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
85787: l_bflow_applied_to_amt NUMBER; -- 5132302
85788: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
85789:
85790: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
85791:
85792: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
85859: l_accrual_line_num := NULL; -- 4262811
85860: l_tmp_amt := NULL; -- 4262811
85861: --
85862:
85863: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
85864: l_balance_type_code <> 'B' THEN
85865: IF NVL(p_source_15,'
85866: ') = 'ACCOUNT_SEGMENT_VALUE' AND
85867: NVL(p_source_135,'
85933: --
85934: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
85935:
85936: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
85937: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
85938:
85939: -- 4955764
85940: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
85941: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
86055: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
86056:
86057: IF xla_accounting_cache_pkg.GetValueChar
86058: (p_source_code => 'LEDGER_CATEGORY_CODE'
86059: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
86060: AND l_bflow_method_code = 'PRIOR_ENTRY'
86061: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
86062: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
86063: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
86256: p_lookup_type => 'XLA_OWNER_TYPE'
86257: ,p_lookup_code => l_component_type_code
86258: )
86259: ,p_token_4 => 'PRODUCT_NAME'
86260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
86261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
86262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
86263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
86264: ,p_ae_header_id => NULL
86257: ,p_lookup_code => l_component_type_code
86258: )
86259: ,p_token_4 => 'PRODUCT_NAME'
86260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
86261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
86262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
86263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
86264: ,p_ae_header_id => NULL
86265: );
86258: )
86259: ,p_token_4 => 'PRODUCT_NAME'
86260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
86261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
86262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
86263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
86264: ,p_ae_header_id => NULL
86265: );
86266:
86259: ,p_token_4 => 'PRODUCT_NAME'
86260: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
86261: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
86262: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
86263: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
86264: ,p_ae_header_id => NULL
86265: );
86266:
86267: IF (C_LEVEL_ERROR>= g_log_level) THEN
86290: ----------------------------------------------------------------------------------
86291: -- 4219869 Business Flow
86292: -- Update journal entry status -- Need to generate this within IF
86293: ----------------------------------------------------------------------------------
86294: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
86295: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
86296: ,p_balance_type_code => l_balance_type_code
86297: );
86298:
86444:
86445: --
86446: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
86447: --
86448: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
86449: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
86450: ELSE
86451: ---------------------------------------------------------------------------------------------------
86452: -- 4262811a Switch Sign
86469:
86470: XLA_AE_LINES_PKG.ValidateCurrentLine;
86471: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
86472:
86473: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
86474: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
86475: ,p_balance_type_code => l_balance_type_code);
86476:
86477: END IF;
86642: l_tmp_amt NUMBER;
86643: l_acc_rev_natural_side_code VARCHAR2(1);
86644:
86645: l_num_entries NUMBER;
86646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
86647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
86648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
86649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
86650: l_recog_line_1 NUMBER;
86643: l_acc_rev_natural_side_code VARCHAR2(1);
86644:
86645: l_num_entries NUMBER;
86646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
86647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
86648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
86649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
86650: l_recog_line_1 NUMBER;
86651: l_recog_line_2 NUMBER;
86644:
86645: l_num_entries NUMBER;
86646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
86647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
86648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
86649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
86650: l_recog_line_1 NUMBER;
86651: l_recog_line_2 NUMBER;
86652:
86645: l_num_entries NUMBER;
86646: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
86647: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
86648: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
86649: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
86650: l_recog_line_1 NUMBER;
86651: l_recog_line_2 NUMBER;
86652:
86653: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
86651: l_recog_line_2 NUMBER;
86652:
86653: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
86654: l_bflow_applied_to_amt NUMBER; -- 5132302
86655: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
86656:
86657: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
86658:
86659: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
86726: l_accrual_line_num := NULL; -- 4262811
86727: l_tmp_amt := NULL; -- 4262811
86728: --
86729:
86730: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
86731: l_balance_type_code <> 'B' THEN
86732: IF NVL(p_source_15,'
86733: ') = 'BALANCING_SEGMENT' AND
86734: NVL(p_source_135,'
86800: --
86801: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
86802:
86803: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
86804: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
86805:
86806: -- 4955764
86807: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
86808: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
86922: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
86923:
86924: IF xla_accounting_cache_pkg.GetValueChar
86925: (p_source_code => 'LEDGER_CATEGORY_CODE'
86926: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
86927: AND l_bflow_method_code = 'PRIOR_ENTRY'
86928: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
86929: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
86930: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
87080: p_lookup_type => 'XLA_OWNER_TYPE'
87081: ,p_lookup_code => l_component_type_code
87082: )
87083: ,p_token_4 => 'PRODUCT_NAME'
87084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87088: ,p_ae_header_id => NULL
87081: ,p_lookup_code => l_component_type_code
87082: )
87083: ,p_token_4 => 'PRODUCT_NAME'
87084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87088: ,p_ae_header_id => NULL
87089: );
87082: )
87083: ,p_token_4 => 'PRODUCT_NAME'
87084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87088: ,p_ae_header_id => NULL
87089: );
87090:
87083: ,p_token_4 => 'PRODUCT_NAME'
87084: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87085: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87086: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87087: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87088: ,p_ae_header_id => NULL
87089: );
87090:
87091: IF (C_LEVEL_ERROR>= g_log_level) THEN
87114: ----------------------------------------------------------------------------------
87115: -- 4219869 Business Flow
87116: -- Update journal entry status -- Need to generate this within IF
87117: ----------------------------------------------------------------------------------
87118: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
87119: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
87120: ,p_balance_type_code => l_balance_type_code
87121: );
87122:
87225:
87226: --
87227: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
87228: --
87229: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
87230: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
87231: ELSE
87232: ---------------------------------------------------------------------------------------------------
87233: -- 4262811a Switch Sign
87250:
87251: XLA_AE_LINES_PKG.ValidateCurrentLine;
87252: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
87253:
87254: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
87255: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
87256: ,p_balance_type_code => l_balance_type_code);
87257:
87258: END IF;
87428: l_tmp_amt NUMBER;
87429: l_acc_rev_natural_side_code VARCHAR2(1);
87430:
87431: l_num_entries NUMBER;
87432: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
87433: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
87434: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
87435: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
87436: l_recog_line_1 NUMBER;
87429: l_acc_rev_natural_side_code VARCHAR2(1);
87430:
87431: l_num_entries NUMBER;
87432: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
87433: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
87434: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
87435: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
87436: l_recog_line_1 NUMBER;
87437: l_recog_line_2 NUMBER;
87430:
87431: l_num_entries NUMBER;
87432: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
87433: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
87434: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
87435: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
87436: l_recog_line_1 NUMBER;
87437: l_recog_line_2 NUMBER;
87438:
87431: l_num_entries NUMBER;
87432: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
87433: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
87434: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
87435: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
87436: l_recog_line_1 NUMBER;
87437: l_recog_line_2 NUMBER;
87438:
87439: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
87437: l_recog_line_2 NUMBER;
87438:
87439: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
87440: l_bflow_applied_to_amt NUMBER; -- 5132302
87441: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
87442:
87443: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
87444:
87445: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
87512: l_accrual_line_num := NULL; -- 4262811
87513: l_tmp_amt := NULL; -- 4262811
87514: --
87515:
87516: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
87517: l_balance_type_code <> 'B' THEN
87518: IF (NVL(p_source_15,'
87519: ') <> 'BALANCING_SEGMENT' AND
87520: NVL(p_source_15,'
87602: --
87603: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
87604:
87605: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
87606: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
87607:
87608: -- 4955764
87609: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
87610: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
87728: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
87729:
87730: IF xla_accounting_cache_pkg.GetValueChar
87731: (p_source_code => 'LEDGER_CATEGORY_CODE'
87732: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
87733: AND l_bflow_method_code = 'PRIOR_ENTRY'
87734: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
87735: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
87736: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
87859: p_lookup_type => 'XLA_OWNER_TYPE'
87860: ,p_lookup_code => l_component_type_code
87861: )
87862: ,p_token_4 => 'PRODUCT_NAME'
87863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87867: ,p_ae_header_id => NULL
87860: ,p_lookup_code => l_component_type_code
87861: )
87862: ,p_token_4 => 'PRODUCT_NAME'
87863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87867: ,p_ae_header_id => NULL
87868: );
87861: )
87862: ,p_token_4 => 'PRODUCT_NAME'
87863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87867: ,p_ae_header_id => NULL
87868: );
87869:
87862: ,p_token_4 => 'PRODUCT_NAME'
87863: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
87864: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
87865: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
87866: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
87867: ,p_ae_header_id => NULL
87868: );
87869:
87870: IF (C_LEVEL_ERROR>= g_log_level) THEN
87893: ----------------------------------------------------------------------------------
87894: -- 4219869 Business Flow
87895: -- Update journal entry status -- Need to generate this within IF
87896: ----------------------------------------------------------------------------------
87897: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
87898: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
87899: ,p_balance_type_code => l_balance_type_code
87900: );
87901:
87980:
87981: --
87982: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
87983: --
87984: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
87985: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
87986: ELSE
87987: ---------------------------------------------------------------------------------------------------
87988: -- 4262811a Switch Sign
88005:
88006: XLA_AE_LINES_PKG.ValidateCurrentLine;
88007: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
88008:
88009: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
88010: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
88011: ,p_balance_type_code => l_balance_type_code);
88012:
88013: END IF;
88183: l_tmp_amt NUMBER;
88184: l_acc_rev_natural_side_code VARCHAR2(1);
88185:
88186: l_num_entries NUMBER;
88187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
88188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
88189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
88190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
88191: l_recog_line_1 NUMBER;
88184: l_acc_rev_natural_side_code VARCHAR2(1);
88185:
88186: l_num_entries NUMBER;
88187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
88188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
88189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
88190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
88191: l_recog_line_1 NUMBER;
88192: l_recog_line_2 NUMBER;
88185:
88186: l_num_entries NUMBER;
88187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
88188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
88189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
88190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
88191: l_recog_line_1 NUMBER;
88192: l_recog_line_2 NUMBER;
88193:
88186: l_num_entries NUMBER;
88187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
88188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
88189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
88190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
88191: l_recog_line_1 NUMBER;
88192: l_recog_line_2 NUMBER;
88193:
88194: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
88192: l_recog_line_2 NUMBER;
88193:
88194: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
88195: l_bflow_applied_to_amt NUMBER; -- 5132302
88196: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
88197:
88198: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
88199:
88200: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
88267: l_accrual_line_num := NULL; -- 4262811
88268: l_tmp_amt := NULL; -- 4262811
88269: --
88270:
88271: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
88272: l_balance_type_code <> 'B' THEN
88273: IF NVL(p_source_15,'
88274: ') = 'ACCOUNT_SEGMENT_VALUE' AND
88275: (NVL(p_source_164,'
88355: --
88356: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
88357:
88358: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
88359: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
88360:
88361: -- 4955764
88362: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
88363: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
88481: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
88482:
88483: IF xla_accounting_cache_pkg.GetValueChar
88484: (p_source_code => 'LEDGER_CATEGORY_CODE'
88485: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
88486: AND l_bflow_method_code = 'PRIOR_ENTRY'
88487: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
88488: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
88489: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
88682: p_lookup_type => 'XLA_OWNER_TYPE'
88683: ,p_lookup_code => l_component_type_code
88684: )
88685: ,p_token_4 => 'PRODUCT_NAME'
88686: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
88687: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
88688: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
88689: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
88690: ,p_ae_header_id => NULL
88683: ,p_lookup_code => l_component_type_code
88684: )
88685: ,p_token_4 => 'PRODUCT_NAME'
88686: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
88687: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
88688: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
88689: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
88690: ,p_ae_header_id => NULL
88691: );
88684: )
88685: ,p_token_4 => 'PRODUCT_NAME'
88686: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
88687: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
88688: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
88689: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
88690: ,p_ae_header_id => NULL
88691: );
88692:
88685: ,p_token_4 => 'PRODUCT_NAME'
88686: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
88687: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
88688: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
88689: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
88690: ,p_ae_header_id => NULL
88691: );
88692:
88693: IF (C_LEVEL_ERROR>= g_log_level) THEN
88716: ----------------------------------------------------------------------------------
88717: -- 4219869 Business Flow
88718: -- Update journal entry status -- Need to generate this within IF
88719: ----------------------------------------------------------------------------------
88720: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
88721: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
88722: ,p_balance_type_code => l_balance_type_code
88723: );
88724:
88870:
88871: --
88872: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
88873: --
88874: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
88875: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
88876: ELSE
88877: ---------------------------------------------------------------------------------------------------
88878: -- 4262811a Switch Sign
88895:
88896: XLA_AE_LINES_PKG.ValidateCurrentLine;
88897: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
88898:
88899: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
88900: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
88901: ,p_balance_type_code => l_balance_type_code);
88902:
88903: END IF;
89073: l_tmp_amt NUMBER;
89074: l_acc_rev_natural_side_code VARCHAR2(1);
89075:
89076: l_num_entries NUMBER;
89077: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89078: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89079: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89080: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89081: l_recog_line_1 NUMBER;
89074: l_acc_rev_natural_side_code VARCHAR2(1);
89075:
89076: l_num_entries NUMBER;
89077: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89078: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89079: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89080: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89081: l_recog_line_1 NUMBER;
89082: l_recog_line_2 NUMBER;
89075:
89076: l_num_entries NUMBER;
89077: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89078: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89079: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89080: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89081: l_recog_line_1 NUMBER;
89082: l_recog_line_2 NUMBER;
89083:
89076: l_num_entries NUMBER;
89077: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89078: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89079: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89080: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89081: l_recog_line_1 NUMBER;
89082: l_recog_line_2 NUMBER;
89083:
89084: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
89082: l_recog_line_2 NUMBER;
89083:
89084: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
89085: l_bflow_applied_to_amt NUMBER; -- 5132302
89086: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
89087:
89088: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
89089:
89090: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
89157: l_accrual_line_num := NULL; -- 4262811
89158: l_tmp_amt := NULL; -- 4262811
89159: --
89160:
89161: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
89162: l_balance_type_code <> 'B' THEN
89163: IF NVL(p_source_15,'
89164: ') = 'BALANCING_SEGMENT' AND
89165: (NVL(p_source_164,'
89245: --
89246: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
89247:
89248: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
89249: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
89250:
89251: -- 4955764
89252: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
89253: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
89371: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
89372:
89373: IF xla_accounting_cache_pkg.GetValueChar
89374: (p_source_code => 'LEDGER_CATEGORY_CODE'
89375: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
89376: AND l_bflow_method_code = 'PRIOR_ENTRY'
89377: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
89378: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
89379: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
89529: p_lookup_type => 'XLA_OWNER_TYPE'
89530: ,p_lookup_code => l_component_type_code
89531: )
89532: ,p_token_4 => 'PRODUCT_NAME'
89533: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
89534: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
89535: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
89536: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
89537: ,p_ae_header_id => NULL
89530: ,p_lookup_code => l_component_type_code
89531: )
89532: ,p_token_4 => 'PRODUCT_NAME'
89533: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
89534: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
89535: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
89536: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
89537: ,p_ae_header_id => NULL
89538: );
89531: )
89532: ,p_token_4 => 'PRODUCT_NAME'
89533: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
89534: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
89535: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
89536: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
89537: ,p_ae_header_id => NULL
89538: );
89539:
89532: ,p_token_4 => 'PRODUCT_NAME'
89533: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
89534: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
89535: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
89536: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
89537: ,p_ae_header_id => NULL
89538: );
89539:
89540: IF (C_LEVEL_ERROR>= g_log_level) THEN
89563: ----------------------------------------------------------------------------------
89564: -- 4219869 Business Flow
89565: -- Update journal entry status -- Need to generate this within IF
89566: ----------------------------------------------------------------------------------
89567: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
89568: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
89569: ,p_balance_type_code => l_balance_type_code
89570: );
89571:
89674:
89675: --
89676: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
89677: --
89678: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
89679: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
89680: ELSE
89681: ---------------------------------------------------------------------------------------------------
89682: -- 4262811a Switch Sign
89699:
89700: XLA_AE_LINES_PKG.ValidateCurrentLine;
89701: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
89702:
89703: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
89704: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
89705: ,p_balance_type_code => l_balance_type_code);
89706:
89707: END IF;
89835: l_tmp_amt NUMBER;
89836: l_acc_rev_natural_side_code VARCHAR2(1);
89837:
89838: l_num_entries NUMBER;
89839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89843: l_recog_line_1 NUMBER;
89836: l_acc_rev_natural_side_code VARCHAR2(1);
89837:
89838: l_num_entries NUMBER;
89839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89843: l_recog_line_1 NUMBER;
89844: l_recog_line_2 NUMBER;
89837:
89838: l_num_entries NUMBER;
89839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89843: l_recog_line_1 NUMBER;
89844: l_recog_line_2 NUMBER;
89845:
89838: l_num_entries NUMBER;
89839: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
89840: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
89841: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
89842: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
89843: l_recog_line_1 NUMBER;
89844: l_recog_line_2 NUMBER;
89845:
89846: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
89844: l_recog_line_2 NUMBER;
89845:
89846: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
89847: l_bflow_applied_to_amt NUMBER; -- 5132302
89848: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
89849:
89850: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
89851:
89852: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
89919: l_accrual_line_num := NULL; -- 4262811
89920: l_tmp_amt := NULL; -- 4262811
89921: --
89922:
89923: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
89924: l_balance_type_code <> 'B' THEN
89925: IF NVL(p_source_96,'
89926: ') <> 'CLEAR_CLEAR' AND
89927: NVL(p_source_160,'
90001: --
90002: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
90003:
90004: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
90005: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
90006:
90007: -- 4955764
90008: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
90009: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
90067: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
90068:
90069: IF xla_accounting_cache_pkg.GetValueChar
90070: (p_source_code => 'LEDGER_CATEGORY_CODE'
90071: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
90072: AND l_bflow_method_code = 'PRIOR_ENTRY'
90073: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
90074: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
90075: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
90144: p_lookup_type => 'XLA_OWNER_TYPE'
90145: ,p_lookup_code => l_component_type_code
90146: )
90147: ,p_token_4 => 'PRODUCT_NAME'
90148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90152: ,p_ae_header_id => NULL
90145: ,p_lookup_code => l_component_type_code
90146: )
90147: ,p_token_4 => 'PRODUCT_NAME'
90148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90152: ,p_ae_header_id => NULL
90153: );
90146: )
90147: ,p_token_4 => 'PRODUCT_NAME'
90148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90152: ,p_ae_header_id => NULL
90153: );
90154:
90147: ,p_token_4 => 'PRODUCT_NAME'
90148: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90149: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90150: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90151: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90152: ,p_ae_header_id => NULL
90153: );
90154:
90155: IF (C_LEVEL_ERROR>= g_log_level) THEN
90178: ----------------------------------------------------------------------------------
90179: -- 4219869 Business Flow
90180: -- Update journal entry status -- Need to generate this within IF
90181: ----------------------------------------------------------------------------------
90182: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
90183: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
90184: ,p_balance_type_code => l_balance_type_code
90185: );
90186:
90239:
90240: --
90241: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
90242: --
90243: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
90244: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
90245: ELSE
90246: ---------------------------------------------------------------------------------------------------
90247: -- 4262811a Switch Sign
90264:
90265: XLA_AE_LINES_PKG.ValidateCurrentLine;
90266: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
90267:
90268: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
90269: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
90270: ,p_balance_type_code => l_balance_type_code);
90271:
90272: END IF;
90439: l_tmp_amt NUMBER;
90440: l_acc_rev_natural_side_code VARCHAR2(1);
90441:
90442: l_num_entries NUMBER;
90443: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
90444: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
90445: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
90446: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
90447: l_recog_line_1 NUMBER;
90440: l_acc_rev_natural_side_code VARCHAR2(1);
90441:
90442: l_num_entries NUMBER;
90443: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
90444: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
90445: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
90446: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
90447: l_recog_line_1 NUMBER;
90448: l_recog_line_2 NUMBER;
90441:
90442: l_num_entries NUMBER;
90443: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
90444: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
90445: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
90446: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
90447: l_recog_line_1 NUMBER;
90448: l_recog_line_2 NUMBER;
90449:
90442: l_num_entries NUMBER;
90443: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
90444: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
90445: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
90446: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
90447: l_recog_line_1 NUMBER;
90448: l_recog_line_2 NUMBER;
90449:
90450: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
90448: l_recog_line_2 NUMBER;
90449:
90450: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
90451: l_bflow_applied_to_amt NUMBER; -- 5132302
90452: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
90453:
90454: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
90455:
90456: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
90523: l_accrual_line_num := NULL; -- 4262811
90524: l_tmp_amt := NULL; -- 4262811
90525: --
90526:
90527: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
90528: l_balance_type_code <> 'B' THEN
90529: IF (NVL(p_source_15,'
90530: ') <> 'BALANCING_SEGMENT' AND
90531: NVL(p_source_15,'
90599: --
90600: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
90601:
90602: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
90603: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
90604:
90605: -- 4955764
90606: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
90607: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
90723: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
90724:
90725: IF xla_accounting_cache_pkg.GetValueChar
90726: (p_source_code => 'LEDGER_CATEGORY_CODE'
90727: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
90728: AND l_bflow_method_code = 'PRIOR_ENTRY'
90729: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
90730: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
90731: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
90854: p_lookup_type => 'XLA_OWNER_TYPE'
90855: ,p_lookup_code => l_component_type_code
90856: )
90857: ,p_token_4 => 'PRODUCT_NAME'
90858: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90859: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90860: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90861: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90862: ,p_ae_header_id => NULL
90855: ,p_lookup_code => l_component_type_code
90856: )
90857: ,p_token_4 => 'PRODUCT_NAME'
90858: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90859: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90860: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90861: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90862: ,p_ae_header_id => NULL
90863: );
90856: )
90857: ,p_token_4 => 'PRODUCT_NAME'
90858: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90859: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90860: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90861: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90862: ,p_ae_header_id => NULL
90863: );
90864:
90857: ,p_token_4 => 'PRODUCT_NAME'
90858: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
90859: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
90860: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
90861: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
90862: ,p_ae_header_id => NULL
90863: );
90864:
90865: IF (C_LEVEL_ERROR>= g_log_level) THEN
90888: ----------------------------------------------------------------------------------
90889: -- 4219869 Business Flow
90890: -- Update journal entry status -- Need to generate this within IF
90891: ----------------------------------------------------------------------------------
90892: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
90893: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
90894: ,p_balance_type_code => l_balance_type_code
90895: );
90896:
90975:
90976: --
90977: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
90978: --
90979: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
90980: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
90981: ELSE
90982: ---------------------------------------------------------------------------------------------------
90983: -- 4262811a Switch Sign
91000:
91001: XLA_AE_LINES_PKG.ValidateCurrentLine;
91002: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
91003:
91004: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
91005: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
91006: ,p_balance_type_code => l_balance_type_code);
91007:
91008: END IF;
91177: l_tmp_amt NUMBER;
91178: l_acc_rev_natural_side_code VARCHAR2(1);
91179:
91180: l_num_entries NUMBER;
91181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
91182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
91183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
91184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
91185: l_recog_line_1 NUMBER;
91178: l_acc_rev_natural_side_code VARCHAR2(1);
91179:
91180: l_num_entries NUMBER;
91181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
91182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
91183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
91184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
91185: l_recog_line_1 NUMBER;
91186: l_recog_line_2 NUMBER;
91179:
91180: l_num_entries NUMBER;
91181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
91182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
91183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
91184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
91185: l_recog_line_1 NUMBER;
91186: l_recog_line_2 NUMBER;
91187:
91180: l_num_entries NUMBER;
91181: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
91182: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
91183: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
91184: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
91185: l_recog_line_1 NUMBER;
91186: l_recog_line_2 NUMBER;
91187:
91188: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
91186: l_recog_line_2 NUMBER;
91187:
91188: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
91189: l_bflow_applied_to_amt NUMBER; -- 5132302
91190: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
91191:
91192: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
91193:
91194: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
91261: l_accrual_line_num := NULL; -- 4262811
91262: l_tmp_amt := NULL; -- 4262811
91263: --
91264:
91265: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
91266: l_balance_type_code <> 'B' THEN
91267: IF NVL(p_source_15,'
91268: ') = 'ACCOUNT_SEGMENT_VALUE' AND
91269: NVL(p_source_135,'
91335: --
91336: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
91337:
91338: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
91339: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
91340:
91341: -- 4955764
91342: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
91343: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
91459: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
91460:
91461: IF xla_accounting_cache_pkg.GetValueChar
91462: (p_source_code => 'LEDGER_CATEGORY_CODE'
91463: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
91464: AND l_bflow_method_code = 'PRIOR_ENTRY'
91465: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
91466: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
91467: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
91679: p_lookup_type => 'XLA_OWNER_TYPE'
91680: ,p_lookup_code => l_component_type_code
91681: )
91682: ,p_token_4 => 'PRODUCT_NAME'
91683: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
91684: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
91685: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
91686: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
91687: ,p_ae_header_id => NULL
91680: ,p_lookup_code => l_component_type_code
91681: )
91682: ,p_token_4 => 'PRODUCT_NAME'
91683: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
91684: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
91685: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
91686: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
91687: ,p_ae_header_id => NULL
91688: );
91681: )
91682: ,p_token_4 => 'PRODUCT_NAME'
91683: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
91684: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
91685: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
91686: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
91687: ,p_ae_header_id => NULL
91688: );
91689:
91682: ,p_token_4 => 'PRODUCT_NAME'
91683: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
91684: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
91685: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
91686: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
91687: ,p_ae_header_id => NULL
91688: );
91689:
91690: IF (C_LEVEL_ERROR>= g_log_level) THEN
91713: ----------------------------------------------------------------------------------
91714: -- 4219869 Business Flow
91715: -- Update journal entry status -- Need to generate this within IF
91716: ----------------------------------------------------------------------------------
91717: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
91718: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
91719: ,p_balance_type_code => l_balance_type_code
91720: );
91721:
91867:
91868: --
91869: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
91870: --
91871: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
91872: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
91873: ELSE
91874: ---------------------------------------------------------------------------------------------------
91875: -- 4262811a Switch Sign
91892:
91893: XLA_AE_LINES_PKG.ValidateCurrentLine;
91894: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
91895:
91896: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
91897: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
91898: ,p_balance_type_code => l_balance_type_code);
91899:
91900: END IF;
92067: l_tmp_amt NUMBER;
92068: l_acc_rev_natural_side_code VARCHAR2(1);
92069:
92070: l_num_entries NUMBER;
92071: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92072: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92073: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92074: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92075: l_recog_line_1 NUMBER;
92068: l_acc_rev_natural_side_code VARCHAR2(1);
92069:
92070: l_num_entries NUMBER;
92071: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92072: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92073: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92074: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92075: l_recog_line_1 NUMBER;
92076: l_recog_line_2 NUMBER;
92069:
92070: l_num_entries NUMBER;
92071: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92072: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92073: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92074: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92075: l_recog_line_1 NUMBER;
92076: l_recog_line_2 NUMBER;
92077:
92070: l_num_entries NUMBER;
92071: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92072: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92073: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92074: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92075: l_recog_line_1 NUMBER;
92076: l_recog_line_2 NUMBER;
92077:
92078: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
92076: l_recog_line_2 NUMBER;
92077:
92078: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
92079: l_bflow_applied_to_amt NUMBER; -- 5132302
92080: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
92081:
92082: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
92083:
92084: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
92151: l_accrual_line_num := NULL; -- 4262811
92152: l_tmp_amt := NULL; -- 4262811
92153: --
92154:
92155: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
92156: l_balance_type_code <> 'B' THEN
92157: IF NVL(p_source_15,'
92158: ') = 'BALANCING_SEGMENT' AND
92159: NVL(p_source_135,'
92225: --
92226: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
92227:
92228: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
92229: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
92230:
92231: -- 4955764
92232: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
92233: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
92349: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
92350:
92351: IF xla_accounting_cache_pkg.GetValueChar
92352: (p_source_code => 'LEDGER_CATEGORY_CODE'
92353: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
92354: AND l_bflow_method_code = 'PRIOR_ENTRY'
92355: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
92356: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
92357: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
92507: p_lookup_type => 'XLA_OWNER_TYPE'
92508: ,p_lookup_code => l_component_type_code
92509: )
92510: ,p_token_4 => 'PRODUCT_NAME'
92511: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
92512: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
92513: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
92514: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
92515: ,p_ae_header_id => NULL
92508: ,p_lookup_code => l_component_type_code
92509: )
92510: ,p_token_4 => 'PRODUCT_NAME'
92511: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
92512: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
92513: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
92514: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
92515: ,p_ae_header_id => NULL
92516: );
92509: )
92510: ,p_token_4 => 'PRODUCT_NAME'
92511: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
92512: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
92513: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
92514: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
92515: ,p_ae_header_id => NULL
92516: );
92517:
92510: ,p_token_4 => 'PRODUCT_NAME'
92511: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
92512: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
92513: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
92514: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
92515: ,p_ae_header_id => NULL
92516: );
92517:
92518: IF (C_LEVEL_ERROR>= g_log_level) THEN
92541: ----------------------------------------------------------------------------------
92542: -- 4219869 Business Flow
92543: -- Update journal entry status -- Need to generate this within IF
92544: ----------------------------------------------------------------------------------
92545: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
92546: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
92547: ,p_balance_type_code => l_balance_type_code
92548: );
92549:
92652:
92653: --
92654: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
92655: --
92656: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
92657: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
92658: ELSE
92659: ---------------------------------------------------------------------------------------------------
92660: -- 4262811a Switch Sign
92677:
92678: XLA_AE_LINES_PKG.ValidateCurrentLine;
92679: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
92680:
92681: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
92682: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
92683: ,p_balance_type_code => l_balance_type_code);
92684:
92685: END IF;
92832: l_tmp_amt NUMBER;
92833: l_acc_rev_natural_side_code VARCHAR2(1);
92834:
92835: l_num_entries NUMBER;
92836: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92837: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92838: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92839: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92840: l_recog_line_1 NUMBER;
92833: l_acc_rev_natural_side_code VARCHAR2(1);
92834:
92835: l_num_entries NUMBER;
92836: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92837: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92838: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92839: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92840: l_recog_line_1 NUMBER;
92841: l_recog_line_2 NUMBER;
92834:
92835: l_num_entries NUMBER;
92836: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92837: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92838: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92839: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92840: l_recog_line_1 NUMBER;
92841: l_recog_line_2 NUMBER;
92842:
92835: l_num_entries NUMBER;
92836: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
92837: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
92838: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
92839: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
92840: l_recog_line_1 NUMBER;
92841: l_recog_line_2 NUMBER;
92842:
92843: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
92841: l_recog_line_2 NUMBER;
92842:
92843: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
92844: l_bflow_applied_to_amt NUMBER; -- 5132302
92845: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
92846:
92847: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
92848:
92849: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
92916: l_accrual_line_num := NULL; -- 4262811
92917: l_tmp_amt := NULL; -- 4262811
92918: --
92919:
92920: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
92921: l_balance_type_code <> 'B' THEN
92922: IF NVL(p_source_143,'
92923: ') = 'PREPAY APPL' OR
92924: NVL(p_source_143,'
92994: --
92995: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
92996:
92997: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
92998: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
92999:
93000: -- 4955764
93001: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
93002: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
93110: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
93111:
93112: IF xla_accounting_cache_pkg.GetValueChar
93113: (p_source_code => 'LEDGER_CATEGORY_CODE'
93114: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
93115: AND l_bflow_method_code = 'PRIOR_ENTRY'
93116: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
93117: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
93118: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
93187: p_lookup_type => 'XLA_OWNER_TYPE'
93188: ,p_lookup_code => l_component_type_code
93189: )
93190: ,p_token_4 => 'PRODUCT_NAME'
93191: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93192: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93193: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93194: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93195: ,p_ae_header_id => NULL
93188: ,p_lookup_code => l_component_type_code
93189: )
93190: ,p_token_4 => 'PRODUCT_NAME'
93191: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93192: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93193: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93194: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93195: ,p_ae_header_id => NULL
93196: );
93189: )
93190: ,p_token_4 => 'PRODUCT_NAME'
93191: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93192: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93193: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93194: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93195: ,p_ae_header_id => NULL
93196: );
93197:
93190: ,p_token_4 => 'PRODUCT_NAME'
93191: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93192: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93193: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93194: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93195: ,p_ae_header_id => NULL
93196: );
93197:
93198: IF (C_LEVEL_ERROR>= g_log_level) THEN
93221: ----------------------------------------------------------------------------------
93222: -- 4219869 Business Flow
93223: -- Update journal entry status -- Need to generate this within IF
93224: ----------------------------------------------------------------------------------
93225: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
93226: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
93227: ,p_balance_type_code => l_balance_type_code
93228: );
93229:
93282:
93283: --
93284: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
93285: --
93286: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
93287: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
93288: ELSE
93289: ---------------------------------------------------------------------------------------------------
93290: -- 4262811a Switch Sign
93307:
93308: XLA_AE_LINES_PKG.ValidateCurrentLine;
93309: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
93310:
93311: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
93312: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
93313: ,p_balance_type_code => l_balance_type_code);
93314:
93315: END IF;
93438: l_tmp_amt NUMBER;
93439: l_acc_rev_natural_side_code VARCHAR2(1);
93440:
93441: l_num_entries NUMBER;
93442: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
93443: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
93444: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
93445: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
93446: l_recog_line_1 NUMBER;
93439: l_acc_rev_natural_side_code VARCHAR2(1);
93440:
93441: l_num_entries NUMBER;
93442: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
93443: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
93444: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
93445: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
93446: l_recog_line_1 NUMBER;
93447: l_recog_line_2 NUMBER;
93440:
93441: l_num_entries NUMBER;
93442: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
93443: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
93444: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
93445: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
93446: l_recog_line_1 NUMBER;
93447: l_recog_line_2 NUMBER;
93448:
93441: l_num_entries NUMBER;
93442: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
93443: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
93444: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
93445: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
93446: l_recog_line_1 NUMBER;
93447: l_recog_line_2 NUMBER;
93448:
93449: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
93447: l_recog_line_2 NUMBER;
93448:
93449: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
93450: l_bflow_applied_to_amt NUMBER; -- 5132302
93451: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
93452:
93453: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
93454:
93455: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
93522: l_accrual_line_num := NULL; -- 4262811
93523: l_tmp_amt := NULL; -- 4262811
93524: --
93525:
93526: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
93527: l_balance_type_code <> 'B' THEN
93528: IF NVL(p_source_96,'
93529: ') <> 'CLEAR_CLEAR' AND
93530: (NVL(p_source_97,'
93602: --
93603: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
93604:
93605: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
93606: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
93607:
93608: -- 4955764
93609: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
93610: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
93666: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
93667:
93668: IF xla_accounting_cache_pkg.GetValueChar
93669: (p_source_code => 'LEDGER_CATEGORY_CODE'
93670: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
93671: AND l_bflow_method_code = 'PRIOR_ENTRY'
93672: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
93673: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
93674: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
93743: p_lookup_type => 'XLA_OWNER_TYPE'
93744: ,p_lookup_code => l_component_type_code
93745: )
93746: ,p_token_4 => 'PRODUCT_NAME'
93747: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93748: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93749: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93750: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93751: ,p_ae_header_id => NULL
93744: ,p_lookup_code => l_component_type_code
93745: )
93746: ,p_token_4 => 'PRODUCT_NAME'
93747: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93748: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93749: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93750: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93751: ,p_ae_header_id => NULL
93752: );
93745: )
93746: ,p_token_4 => 'PRODUCT_NAME'
93747: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93748: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93749: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93750: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93751: ,p_ae_header_id => NULL
93752: );
93753:
93746: ,p_token_4 => 'PRODUCT_NAME'
93747: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
93748: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
93749: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
93750: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
93751: ,p_ae_header_id => NULL
93752: );
93753:
93754: IF (C_LEVEL_ERROR>= g_log_level) THEN
93777: ----------------------------------------------------------------------------------
93778: -- 4219869 Business Flow
93779: -- Update journal entry status -- Need to generate this within IF
93780: ----------------------------------------------------------------------------------
93781: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
93782: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
93783: ,p_balance_type_code => l_balance_type_code
93784: );
93785:
93838:
93839: --
93840: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
93841: --
93842: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
93843: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
93844: ELSE
93845: ---------------------------------------------------------------------------------------------------
93846: -- 4262811a Switch Sign
93863:
93864: XLA_AE_LINES_PKG.ValidateCurrentLine;
93865: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
93866:
93867: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
93868: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
93869: ,p_balance_type_code => l_balance_type_code);
93870:
93871: END IF;
94012: l_tmp_amt NUMBER;
94013: l_acc_rev_natural_side_code VARCHAR2(1);
94014:
94015: l_num_entries NUMBER;
94016: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94017: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94018: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94019: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94020: l_recog_line_1 NUMBER;
94013: l_acc_rev_natural_side_code VARCHAR2(1);
94014:
94015: l_num_entries NUMBER;
94016: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94017: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94018: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94019: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94020: l_recog_line_1 NUMBER;
94021: l_recog_line_2 NUMBER;
94014:
94015: l_num_entries NUMBER;
94016: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94017: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94018: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94019: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94020: l_recog_line_1 NUMBER;
94021: l_recog_line_2 NUMBER;
94022:
94015: l_num_entries NUMBER;
94016: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94017: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94018: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94019: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94020: l_recog_line_1 NUMBER;
94021: l_recog_line_2 NUMBER;
94022:
94023: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
94021: l_recog_line_2 NUMBER;
94022:
94023: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
94024: l_bflow_applied_to_amt NUMBER; -- 5132302
94025: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
94026:
94027: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
94028:
94029: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
94095: l_acc_rev_flag := NULL; -- 4262811
94096: l_accrual_line_num := NULL; -- 4262811
94097: l_tmp_amt := NULL; -- 4262811
94098: --
94099: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
94100: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
94101: return;
94102: END IF;
94103:
94096: l_accrual_line_num := NULL; -- 4262811
94097: l_tmp_amt := NULL; -- 4262811
94098: --
94099: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
94100: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
94101: return;
94102: END IF;
94103:
94104: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
94100: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
94101: return;
94102: END IF;
94103:
94104: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
94105: l_balance_type_code <> 'B' THEN
94106: IF (NVL(p_source_96,'
94107: ') = 'CLEAR_CLEAR' OR
94108: NVL(p_source_96,'
94186: --
94187: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
94188:
94189: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
94190: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
94191:
94192: -- 4955764
94193: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
94194: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
94262: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
94263:
94264: IF xla_accounting_cache_pkg.GetValueChar
94265: (p_source_code => 'LEDGER_CATEGORY_CODE'
94266: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
94267: AND l_bflow_method_code = 'PRIOR_ENTRY'
94268: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
94269: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
94270: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
94471: p_lookup_type => 'XLA_OWNER_TYPE'
94472: ,p_lookup_code => l_component_type_code
94473: )
94474: ,p_token_4 => 'PRODUCT_NAME'
94475: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
94476: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
94477: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
94478: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
94479: ,p_ae_header_id => NULL
94472: ,p_lookup_code => l_component_type_code
94473: )
94474: ,p_token_4 => 'PRODUCT_NAME'
94475: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
94476: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
94477: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
94478: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
94479: ,p_ae_header_id => NULL
94480: );
94473: )
94474: ,p_token_4 => 'PRODUCT_NAME'
94475: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
94476: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
94477: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
94478: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
94479: ,p_ae_header_id => NULL
94480: );
94481:
94474: ,p_token_4 => 'PRODUCT_NAME'
94475: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
94476: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
94477: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
94478: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
94479: ,p_ae_header_id => NULL
94480: );
94481:
94482: IF (C_LEVEL_ERROR>= g_log_level) THEN
94505: ----------------------------------------------------------------------------------
94506: -- 4219869 Business Flow
94507: -- Update journal entry status -- Need to generate this within IF
94508: ----------------------------------------------------------------------------------
94509: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
94510: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
94511: ,p_balance_type_code => l_balance_type_code
94512: );
94513:
94683:
94684: --
94685: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
94686: --
94687: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
94688: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
94689: ELSE
94690: ---------------------------------------------------------------------------------------------------
94691: -- 4262811a Switch Sign
94708:
94709: XLA_AE_LINES_PKG.ValidateCurrentLine;
94710: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
94711:
94712: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
94713: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
94714: ,p_balance_type_code => l_balance_type_code);
94715:
94716: END IF;
94859: l_tmp_amt NUMBER;
94860: l_acc_rev_natural_side_code VARCHAR2(1);
94861:
94862: l_num_entries NUMBER;
94863: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94864: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94865: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94866: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94867: l_recog_line_1 NUMBER;
94860: l_acc_rev_natural_side_code VARCHAR2(1);
94861:
94862: l_num_entries NUMBER;
94863: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94864: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94865: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94866: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94867: l_recog_line_1 NUMBER;
94868: l_recog_line_2 NUMBER;
94861:
94862: l_num_entries NUMBER;
94863: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94864: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94865: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94866: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94867: l_recog_line_1 NUMBER;
94868: l_recog_line_2 NUMBER;
94869:
94862: l_num_entries NUMBER;
94863: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
94864: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
94865: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
94866: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
94867: l_recog_line_1 NUMBER;
94868: l_recog_line_2 NUMBER;
94869:
94870: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
94868: l_recog_line_2 NUMBER;
94869:
94870: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
94871: l_bflow_applied_to_amt NUMBER; -- 5132302
94872: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
94873:
94874: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
94875:
94876: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
94942: l_acc_rev_flag := NULL; -- 4262811
94943: l_accrual_line_num := NULL; -- 4262811
94944: l_tmp_amt := NULL; -- 4262811
94945: --
94946: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
94947: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
94948: return;
94949: END IF;
94950:
94943: l_accrual_line_num := NULL; -- 4262811
94944: l_tmp_amt := NULL; -- 4262811
94945: --
94946: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
94947: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
94948: return;
94949: END IF;
94950:
94951: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
94947: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
94948: return;
94949: END IF;
94950:
94951: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
94952: l_balance_type_code <> 'B' THEN
94953: IF NVL(p_source_96,'
94954: ') = 'ALWAYS_ALWAYS' AND
94955: p_source_114 IS NOT NULL AND
95030: --
95031: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
95032:
95033: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
95034: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
95035:
95036: -- 4955764
95037: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
95038: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
95106: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
95107:
95108: IF xla_accounting_cache_pkg.GetValueChar
95109: (p_source_code => 'LEDGER_CATEGORY_CODE'
95110: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
95111: AND l_bflow_method_code = 'PRIOR_ENTRY'
95112: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
95113: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
95114: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
95315: p_lookup_type => 'XLA_OWNER_TYPE'
95316: ,p_lookup_code => l_component_type_code
95317: )
95318: ,p_token_4 => 'PRODUCT_NAME'
95319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
95320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
95321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
95322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
95323: ,p_ae_header_id => NULL
95316: ,p_lookup_code => l_component_type_code
95317: )
95318: ,p_token_4 => 'PRODUCT_NAME'
95319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
95320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
95321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
95322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
95323: ,p_ae_header_id => NULL
95324: );
95317: )
95318: ,p_token_4 => 'PRODUCT_NAME'
95319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
95320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
95321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
95322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
95323: ,p_ae_header_id => NULL
95324: );
95325:
95318: ,p_token_4 => 'PRODUCT_NAME'
95319: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
95320: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
95321: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
95322: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
95323: ,p_ae_header_id => NULL
95324: );
95325:
95326: IF (C_LEVEL_ERROR>= g_log_level) THEN
95349: ----------------------------------------------------------------------------------
95350: -- 4219869 Business Flow
95351: -- Update journal entry status -- Need to generate this within IF
95352: ----------------------------------------------------------------------------------
95353: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
95354: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
95355: ,p_balance_type_code => l_balance_type_code
95356: );
95357:
95527:
95528: --
95529: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
95530: --
95531: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
95532: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
95533: ELSE
95534: ---------------------------------------------------------------------------------------------------
95535: -- 4262811a Switch Sign
95552:
95553: XLA_AE_LINES_PKG.ValidateCurrentLine;
95554: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
95555:
95556: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
95557: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
95558: ,p_balance_type_code => l_balance_type_code);
95559:
95560: END IF;
95708: l_tmp_amt NUMBER;
95709: l_acc_rev_natural_side_code VARCHAR2(1);
95710:
95711: l_num_entries NUMBER;
95712: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
95713: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
95714: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
95715: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
95716: l_recog_line_1 NUMBER;
95709: l_acc_rev_natural_side_code VARCHAR2(1);
95710:
95711: l_num_entries NUMBER;
95712: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
95713: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
95714: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
95715: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
95716: l_recog_line_1 NUMBER;
95717: l_recog_line_2 NUMBER;
95710:
95711: l_num_entries NUMBER;
95712: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
95713: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
95714: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
95715: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
95716: l_recog_line_1 NUMBER;
95717: l_recog_line_2 NUMBER;
95718:
95711: l_num_entries NUMBER;
95712: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
95713: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
95714: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
95715: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
95716: l_recog_line_1 NUMBER;
95717: l_recog_line_2 NUMBER;
95718:
95719: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
95717: l_recog_line_2 NUMBER;
95718:
95719: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
95720: l_bflow_applied_to_amt NUMBER; -- 5132302
95721: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
95722:
95723: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
95724:
95725: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
95791: l_acc_rev_flag := NULL; -- 4262811
95792: l_accrual_line_num := NULL; -- 4262811
95793: l_tmp_amt := NULL; -- 4262811
95794: --
95795: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
95796: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
95797: return;
95798: END IF;
95799:
95792: l_accrual_line_num := NULL; -- 4262811
95793: l_tmp_amt := NULL; -- 4262811
95794: --
95795: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
95796: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
95797: return;
95798: END IF;
95799:
95800: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
95796: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
95797: return;
95798: END IF;
95799:
95800: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
95801: l_balance_type_code <> 'B' THEN
95802: IF (NVL(p_source_96,'
95803: ') <> 'CLEAR_CLEAR' AND
95804: NVL(p_source_96,'
95884: --
95885: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
95886:
95887: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
95888: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
95889:
95890: -- 4955764
95891: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
95892: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
95960: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
95961:
95962: IF xla_accounting_cache_pkg.GetValueChar
95963: (p_source_code => 'LEDGER_CATEGORY_CODE'
95964: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
95965: AND l_bflow_method_code = 'PRIOR_ENTRY'
95966: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
95967: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
95968: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
96169: p_lookup_type => 'XLA_OWNER_TYPE'
96170: ,p_lookup_code => l_component_type_code
96171: )
96172: ,p_token_4 => 'PRODUCT_NAME'
96173: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
96174: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
96175: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
96176: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
96177: ,p_ae_header_id => NULL
96170: ,p_lookup_code => l_component_type_code
96171: )
96172: ,p_token_4 => 'PRODUCT_NAME'
96173: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
96174: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
96175: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
96176: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
96177: ,p_ae_header_id => NULL
96178: );
96171: )
96172: ,p_token_4 => 'PRODUCT_NAME'
96173: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
96174: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
96175: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
96176: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
96177: ,p_ae_header_id => NULL
96178: );
96179:
96172: ,p_token_4 => 'PRODUCT_NAME'
96173: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
96174: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
96175: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
96176: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
96177: ,p_ae_header_id => NULL
96178: );
96179:
96180: IF (C_LEVEL_ERROR>= g_log_level) THEN
96203: ----------------------------------------------------------------------------------
96204: -- 4219869 Business Flow
96205: -- Update journal entry status -- Need to generate this within IF
96206: ----------------------------------------------------------------------------------
96207: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
96208: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
96209: ,p_balance_type_code => l_balance_type_code
96210: );
96211:
96381:
96382: --
96383: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
96384: --
96385: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
96386: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
96387: ELSE
96388: ---------------------------------------------------------------------------------------------------
96389: -- 4262811a Switch Sign
96406:
96407: XLA_AE_LINES_PKG.ValidateCurrentLine;
96408: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
96409:
96410: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
96411: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
96412: ,p_balance_type_code => l_balance_type_code);
96413:
96414: END IF;
96557: l_tmp_amt NUMBER;
96558: l_acc_rev_natural_side_code VARCHAR2(1);
96559:
96560: l_num_entries NUMBER;
96561: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
96562: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
96563: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
96564: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
96565: l_recog_line_1 NUMBER;
96558: l_acc_rev_natural_side_code VARCHAR2(1);
96559:
96560: l_num_entries NUMBER;
96561: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
96562: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
96563: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
96564: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
96565: l_recog_line_1 NUMBER;
96566: l_recog_line_2 NUMBER;
96559:
96560: l_num_entries NUMBER;
96561: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
96562: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
96563: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
96564: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
96565: l_recog_line_1 NUMBER;
96566: l_recog_line_2 NUMBER;
96567:
96560: l_num_entries NUMBER;
96561: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
96562: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
96563: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
96564: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
96565: l_recog_line_1 NUMBER;
96566: l_recog_line_2 NUMBER;
96567:
96568: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
96566: l_recog_line_2 NUMBER;
96567:
96568: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
96569: l_bflow_applied_to_amt NUMBER; -- 5132302
96570: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
96571:
96572: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
96573:
96574: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
96640: l_acc_rev_flag := NULL; -- 4262811
96641: l_accrual_line_num := NULL; -- 4262811
96642: l_tmp_amt := NULL; -- 4262811
96643: --
96644: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
96645: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
96646: return;
96647: END IF;
96648:
96641: l_accrual_line_num := NULL; -- 4262811
96642: l_tmp_amt := NULL; -- 4262811
96643: --
96644: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
96645: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
96646: return;
96647: END IF;
96648:
96649: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
96645: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
96646: return;
96647: END IF;
96648:
96649: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
96650: l_balance_type_code <> 'B' THEN
96651: IF NVL(p_source_96,'
96652: ') = 'ALWAYS_ALWAYS' AND
96653: p_source_114 IS NULL AND
96730: --
96731: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
96732:
96733: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
96734: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
96735:
96736: -- 4955764
96737: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
96738: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
96806: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
96807:
96808: IF xla_accounting_cache_pkg.GetValueChar
96809: (p_source_code => 'LEDGER_CATEGORY_CODE'
96810: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
96811: AND l_bflow_method_code = 'PRIOR_ENTRY'
96812: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
96813: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
96814: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
97015: p_lookup_type => 'XLA_OWNER_TYPE'
97016: ,p_lookup_code => l_component_type_code
97017: )
97018: ,p_token_4 => 'PRODUCT_NAME'
97019: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97020: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97021: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97022: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97023: ,p_ae_header_id => NULL
97016: ,p_lookup_code => l_component_type_code
97017: )
97018: ,p_token_4 => 'PRODUCT_NAME'
97019: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97020: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97021: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97022: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97023: ,p_ae_header_id => NULL
97024: );
97017: )
97018: ,p_token_4 => 'PRODUCT_NAME'
97019: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97020: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97021: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97022: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97023: ,p_ae_header_id => NULL
97024: );
97025:
97018: ,p_token_4 => 'PRODUCT_NAME'
97019: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97020: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97021: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97022: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97023: ,p_ae_header_id => NULL
97024: );
97025:
97026: IF (C_LEVEL_ERROR>= g_log_level) THEN
97049: ----------------------------------------------------------------------------------
97050: -- 4219869 Business Flow
97051: -- Update journal entry status -- Need to generate this within IF
97052: ----------------------------------------------------------------------------------
97053: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
97054: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
97055: ,p_balance_type_code => l_balance_type_code
97056: );
97057:
97227:
97228: --
97229: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
97230: --
97231: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
97232: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
97233: ELSE
97234: ---------------------------------------------------------------------------------------------------
97235: -- 4262811a Switch Sign
97252:
97253: XLA_AE_LINES_PKG.ValidateCurrentLine;
97254: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
97255:
97256: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
97257: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
97258: ,p_balance_type_code => l_balance_type_code);
97259:
97260: END IF;
97399: l_tmp_amt NUMBER;
97400: l_acc_rev_natural_side_code VARCHAR2(1);
97401:
97402: l_num_entries NUMBER;
97403: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
97404: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
97405: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
97406: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
97407: l_recog_line_1 NUMBER;
97400: l_acc_rev_natural_side_code VARCHAR2(1);
97401:
97402: l_num_entries NUMBER;
97403: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
97404: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
97405: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
97406: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
97407: l_recog_line_1 NUMBER;
97408: l_recog_line_2 NUMBER;
97401:
97402: l_num_entries NUMBER;
97403: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
97404: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
97405: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
97406: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
97407: l_recog_line_1 NUMBER;
97408: l_recog_line_2 NUMBER;
97409:
97402: l_num_entries NUMBER;
97403: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
97404: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
97405: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
97406: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
97407: l_recog_line_1 NUMBER;
97408: l_recog_line_2 NUMBER;
97409:
97410: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
97408: l_recog_line_2 NUMBER;
97409:
97410: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
97411: l_bflow_applied_to_amt NUMBER; -- 5132302
97412: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
97413:
97414: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
97415:
97416: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
97482: l_acc_rev_flag := NULL; -- 4262811
97483: l_accrual_line_num := NULL; -- 4262811
97484: l_tmp_amt := NULL; -- 4262811
97485: --
97486: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
97487: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
97488: return;
97489: END IF;
97490:
97483: l_accrual_line_num := NULL; -- 4262811
97484: l_tmp_amt := NULL; -- 4262811
97485: --
97486: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
97487: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
97488: return;
97489: END IF;
97490:
97491: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
97487: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
97488: return;
97489: END IF;
97490:
97491: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
97492: l_balance_type_code <> 'B' THEN
97493: IF (NVL(p_source_96,'
97494: ') = 'ALWAYS_ALWAYS' OR
97495: NVL(p_source_96,'
97574: --
97575: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
97576:
97577: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
97578: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
97579:
97580: -- 4955764
97581: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
97582: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
97642: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
97643:
97644: IF xla_accounting_cache_pkg.GetValueChar
97645: (p_source_code => 'LEDGER_CATEGORY_CODE'
97646: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
97647: AND l_bflow_method_code = 'PRIOR_ENTRY'
97648: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
97649: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
97650: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
97851: p_lookup_type => 'XLA_OWNER_TYPE'
97852: ,p_lookup_code => l_component_type_code
97853: )
97854: ,p_token_4 => 'PRODUCT_NAME'
97855: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97856: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97857: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97858: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97859: ,p_ae_header_id => NULL
97852: ,p_lookup_code => l_component_type_code
97853: )
97854: ,p_token_4 => 'PRODUCT_NAME'
97855: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97856: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97857: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97858: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97859: ,p_ae_header_id => NULL
97860: );
97853: )
97854: ,p_token_4 => 'PRODUCT_NAME'
97855: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97856: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97857: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97858: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97859: ,p_ae_header_id => NULL
97860: );
97861:
97854: ,p_token_4 => 'PRODUCT_NAME'
97855: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
97856: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
97857: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
97858: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
97859: ,p_ae_header_id => NULL
97860: );
97861:
97862: IF (C_LEVEL_ERROR>= g_log_level) THEN
97885: ----------------------------------------------------------------------------------
97886: -- 4219869 Business Flow
97887: -- Update journal entry status -- Need to generate this within IF
97888: ----------------------------------------------------------------------------------
97889: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
97890: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
97891: ,p_balance_type_code => l_balance_type_code
97892: );
97893:
98063:
98064: --
98065: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
98066: --
98067: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
98068: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
98069: ELSE
98070: ---------------------------------------------------------------------------------------------------
98071: -- 4262811a Switch Sign
98088:
98089: XLA_AE_LINES_PKG.ValidateCurrentLine;
98090: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
98091:
98092: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
98093: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
98094: ,p_balance_type_code => l_balance_type_code);
98095:
98096: END IF;
98264: l_tmp_amt NUMBER;
98265: l_acc_rev_natural_side_code VARCHAR2(1);
98266:
98267: l_num_entries NUMBER;
98268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
98269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
98270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
98271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
98272: l_recog_line_1 NUMBER;
98265: l_acc_rev_natural_side_code VARCHAR2(1);
98266:
98267: l_num_entries NUMBER;
98268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
98269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
98270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
98271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
98272: l_recog_line_1 NUMBER;
98273: l_recog_line_2 NUMBER;
98266:
98267: l_num_entries NUMBER;
98268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
98269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
98270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
98271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
98272: l_recog_line_1 NUMBER;
98273: l_recog_line_2 NUMBER;
98274:
98267: l_num_entries NUMBER;
98268: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
98269: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
98270: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
98271: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
98272: l_recog_line_1 NUMBER;
98273: l_recog_line_2 NUMBER;
98274:
98275: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
98273: l_recog_line_2 NUMBER;
98274:
98275: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
98276: l_bflow_applied_to_amt NUMBER; -- 5132302
98277: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
98278:
98279: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
98280:
98281: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
98347: l_acc_rev_flag := NULL; -- 4262811
98348: l_accrual_line_num := NULL; -- 4262811
98349: l_tmp_amt := NULL; -- 4262811
98350: --
98351: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
98352: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
98353: return;
98354: END IF;
98355:
98348: l_accrual_line_num := NULL; -- 4262811
98349: l_tmp_amt := NULL; -- 4262811
98350: --
98351: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
98352: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
98353: return;
98354: END IF;
98355:
98356: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
98352: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
98353: return;
98354: END IF;
98355:
98356: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
98357: l_balance_type_code <> 'B' THEN
98358: IF (NVL(p_source_143,'
98359: ') = 'PREPAY APPL' OR
98360: NVL(p_source_143,'
98430: --
98431: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
98432:
98433: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
98434: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
98435:
98436: -- 4955764
98437: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
98438: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
98556: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
98557:
98558: IF xla_accounting_cache_pkg.GetValueChar
98559: (p_source_code => 'LEDGER_CATEGORY_CODE'
98560: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
98561: AND l_bflow_method_code = 'PRIOR_ENTRY'
98562: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
98563: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
98564: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
98747: p_lookup_type => 'XLA_OWNER_TYPE'
98748: ,p_lookup_code => l_component_type_code
98749: )
98750: ,p_token_4 => 'PRODUCT_NAME'
98751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
98752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
98753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
98754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
98755: ,p_ae_header_id => NULL
98748: ,p_lookup_code => l_component_type_code
98749: )
98750: ,p_token_4 => 'PRODUCT_NAME'
98751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
98752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
98753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
98754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
98755: ,p_ae_header_id => NULL
98756: );
98749: )
98750: ,p_token_4 => 'PRODUCT_NAME'
98751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
98752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
98753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
98754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
98755: ,p_ae_header_id => NULL
98756: );
98757:
98750: ,p_token_4 => 'PRODUCT_NAME'
98751: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
98752: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
98753: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
98754: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
98755: ,p_ae_header_id => NULL
98756: );
98757:
98758: IF (C_LEVEL_ERROR>= g_log_level) THEN
98781: ----------------------------------------------------------------------------------
98782: -- 4219869 Business Flow
98783: -- Update journal entry status -- Need to generate this within IF
98784: ----------------------------------------------------------------------------------
98785: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
98786: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
98787: ,p_balance_type_code => l_balance_type_code
98788: );
98789:
98959:
98960: --
98961: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
98962: --
98963: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
98964: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
98965: ELSE
98966: ---------------------------------------------------------------------------------------------------
98967: -- 4262811a Switch Sign
98984:
98985: XLA_AE_LINES_PKG.ValidateCurrentLine;
98986: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
98987:
98988: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
98989: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
98990: ,p_balance_type_code => l_balance_type_code);
98991:
98992: END IF;
99138: l_tmp_amt NUMBER;
99139: l_acc_rev_natural_side_code VARCHAR2(1);
99140:
99141: l_num_entries NUMBER;
99142: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
99143: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
99144: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
99145: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
99146: l_recog_line_1 NUMBER;
99139: l_acc_rev_natural_side_code VARCHAR2(1);
99140:
99141: l_num_entries NUMBER;
99142: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
99143: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
99144: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
99145: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
99146: l_recog_line_1 NUMBER;
99147: l_recog_line_2 NUMBER;
99140:
99141: l_num_entries NUMBER;
99142: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
99143: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
99144: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
99145: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
99146: l_recog_line_1 NUMBER;
99147: l_recog_line_2 NUMBER;
99148:
99141: l_num_entries NUMBER;
99142: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
99143: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
99144: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
99145: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
99146: l_recog_line_1 NUMBER;
99147: l_recog_line_2 NUMBER;
99148:
99149: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
99147: l_recog_line_2 NUMBER;
99148:
99149: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
99150: l_bflow_applied_to_amt NUMBER; -- 5132302
99151: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
99152:
99153: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
99154:
99155: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
99221: l_acc_rev_flag := NULL; -- 4262811
99222: l_accrual_line_num := NULL; -- 4262811
99223: l_tmp_amt := NULL; -- 4262811
99224: --
99225: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
99226: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
99227: return;
99228: END IF;
99229:
99222: l_accrual_line_num := NULL; -- 4262811
99223: l_tmp_amt := NULL; -- 4262811
99224: --
99225: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
99226: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
99227: return;
99228: END IF;
99229:
99230: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
99226: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
99227: return;
99228: END IF;
99229:
99230: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
99231: l_balance_type_code <> 'B' THEN
99232: IF (NVL(p_source_96,'
99233: ') <> 'CLEAR_CLEAR' AND
99234: NVL(p_source_96,'
99312: --
99313: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
99314:
99315: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
99316: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
99317:
99318: -- 4955764
99319: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
99320: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
99386: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
99387:
99388: IF xla_accounting_cache_pkg.GetValueChar
99389: (p_source_code => 'LEDGER_CATEGORY_CODE'
99390: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
99391: AND l_bflow_method_code = 'PRIOR_ENTRY'
99392: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
99393: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
99394: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
99595: p_lookup_type => 'XLA_OWNER_TYPE'
99596: ,p_lookup_code => l_component_type_code
99597: )
99598: ,p_token_4 => 'PRODUCT_NAME'
99599: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
99600: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
99601: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
99602: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
99603: ,p_ae_header_id => NULL
99596: ,p_lookup_code => l_component_type_code
99597: )
99598: ,p_token_4 => 'PRODUCT_NAME'
99599: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
99600: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
99601: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
99602: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
99603: ,p_ae_header_id => NULL
99604: );
99597: )
99598: ,p_token_4 => 'PRODUCT_NAME'
99599: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
99600: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
99601: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
99602: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
99603: ,p_ae_header_id => NULL
99604: );
99605:
99598: ,p_token_4 => 'PRODUCT_NAME'
99599: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
99600: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
99601: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
99602: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
99603: ,p_ae_header_id => NULL
99604: );
99605:
99606: IF (C_LEVEL_ERROR>= g_log_level) THEN
99629: ----------------------------------------------------------------------------------
99630: -- 4219869 Business Flow
99631: -- Update journal entry status -- Need to generate this within IF
99632: ----------------------------------------------------------------------------------
99633: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
99634: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
99635: ,p_balance_type_code => l_balance_type_code
99636: );
99637:
99807:
99808: --
99809: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
99810: --
99811: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
99812: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
99813: ELSE
99814: ---------------------------------------------------------------------------------------------------
99815: -- 4262811a Switch Sign
99832:
99833: XLA_AE_LINES_PKG.ValidateCurrentLine;
99834: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
99835:
99836: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
99837: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
99838: ,p_balance_type_code => l_balance_type_code);
99839:
99840: END IF;
100004: l_tmp_amt NUMBER;
100005: l_acc_rev_natural_side_code VARCHAR2(1);
100006:
100007: l_num_entries NUMBER;
100008: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100009: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100010: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100011: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100012: l_recog_line_1 NUMBER;
100005: l_acc_rev_natural_side_code VARCHAR2(1);
100006:
100007: l_num_entries NUMBER;
100008: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100009: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100010: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100011: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100012: l_recog_line_1 NUMBER;
100013: l_recog_line_2 NUMBER;
100006:
100007: l_num_entries NUMBER;
100008: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100009: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100010: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100011: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100012: l_recog_line_1 NUMBER;
100013: l_recog_line_2 NUMBER;
100014:
100007: l_num_entries NUMBER;
100008: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100009: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100010: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100011: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100012: l_recog_line_1 NUMBER;
100013: l_recog_line_2 NUMBER;
100014:
100015: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
100013: l_recog_line_2 NUMBER;
100014:
100015: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
100016: l_bflow_applied_to_amt NUMBER; -- 5132302
100017: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
100018:
100019: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
100020:
100021: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
100088: l_accrual_line_num := NULL; -- 4262811
100089: l_tmp_amt := NULL; -- 4262811
100090: --
100091:
100092: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
100093: l_balance_type_code <> 'B' THEN
100094: IF NVL(p_source_33,'
100095: ') = 'MISCELLANEOUS'
100096: THEN
100160: --
100161: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
100162:
100163: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
100164: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
100165:
100166: -- 4955764
100167: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
100168: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
100284: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
100285:
100286: IF xla_accounting_cache_pkg.GetValueChar
100287: (p_source_code => 'LEDGER_CATEGORY_CODE'
100288: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
100289: AND l_bflow_method_code = 'PRIOR_ENTRY'
100290: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
100291: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
100292: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
100413: p_lookup_type => 'XLA_OWNER_TYPE'
100414: ,p_lookup_code => l_component_type_code
100415: )
100416: ,p_token_4 => 'PRODUCT_NAME'
100417: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
100418: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
100419: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
100420: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
100421: ,p_ae_header_id => NULL
100414: ,p_lookup_code => l_component_type_code
100415: )
100416: ,p_token_4 => 'PRODUCT_NAME'
100417: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
100418: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
100419: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
100420: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
100421: ,p_ae_header_id => NULL
100422: );
100415: )
100416: ,p_token_4 => 'PRODUCT_NAME'
100417: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
100418: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
100419: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
100420: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
100421: ,p_ae_header_id => NULL
100422: );
100423:
100416: ,p_token_4 => 'PRODUCT_NAME'
100417: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
100418: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
100419: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
100420: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
100421: ,p_ae_header_id => NULL
100422: );
100423:
100424: IF (C_LEVEL_ERROR>= g_log_level) THEN
100447: ----------------------------------------------------------------------------------
100448: -- 4219869 Business Flow
100449: -- Update journal entry status -- Need to generate this within IF
100450: ----------------------------------------------------------------------------------
100451: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
100452: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
100453: ,p_balance_type_code => l_balance_type_code
100454: );
100455:
100534:
100535: --
100536: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
100537: --
100538: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
100539: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
100540: ELSE
100541: ---------------------------------------------------------------------------------------------------
100542: -- 4262811a Switch Sign
100559:
100560: XLA_AE_LINES_PKG.ValidateCurrentLine;
100561: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
100562:
100563: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
100564: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
100565: ,p_balance_type_code => l_balance_type_code);
100566:
100567: END IF;
100729: l_tmp_amt NUMBER;
100730: l_acc_rev_natural_side_code VARCHAR2(1);
100731:
100732: l_num_entries NUMBER;
100733: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100734: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100735: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100736: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100737: l_recog_line_1 NUMBER;
100730: l_acc_rev_natural_side_code VARCHAR2(1);
100731:
100732: l_num_entries NUMBER;
100733: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100734: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100735: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100736: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100737: l_recog_line_1 NUMBER;
100738: l_recog_line_2 NUMBER;
100731:
100732: l_num_entries NUMBER;
100733: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100734: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100735: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100736: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100737: l_recog_line_1 NUMBER;
100738: l_recog_line_2 NUMBER;
100739:
100732: l_num_entries NUMBER;
100733: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
100734: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
100735: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
100736: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
100737: l_recog_line_1 NUMBER;
100738: l_recog_line_2 NUMBER;
100739:
100740: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
100738: l_recog_line_2 NUMBER;
100739:
100740: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
100741: l_bflow_applied_to_amt NUMBER; -- 5132302
100742: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
100743:
100744: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
100745:
100746: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
100813: l_accrual_line_num := NULL; -- 4262811
100814: l_tmp_amt := NULL; -- 4262811
100815: --
100816:
100817: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
100818: l_balance_type_code <> 'B' THEN
100819: IF NVL(p_source_33,'
100820: ') = 'MISCELLANEOUS'
100821: THEN
100885: --
100886: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
100887:
100888: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
100889: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
100890:
100891: -- 4955764
100892: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
100893: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
101007: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
101008:
101009: IF xla_accounting_cache_pkg.GetValueChar
101010: (p_source_code => 'LEDGER_CATEGORY_CODE'
101011: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
101012: AND l_bflow_method_code = 'PRIOR_ENTRY'
101013: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
101014: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
101015: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
101136: p_lookup_type => 'XLA_OWNER_TYPE'
101137: ,p_lookup_code => l_component_type_code
101138: )
101139: ,p_token_4 => 'PRODUCT_NAME'
101140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101144: ,p_ae_header_id => NULL
101137: ,p_lookup_code => l_component_type_code
101138: )
101139: ,p_token_4 => 'PRODUCT_NAME'
101140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101144: ,p_ae_header_id => NULL
101145: );
101138: )
101139: ,p_token_4 => 'PRODUCT_NAME'
101140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101144: ,p_ae_header_id => NULL
101145: );
101146:
101139: ,p_token_4 => 'PRODUCT_NAME'
101140: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101141: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101142: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101143: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101144: ,p_ae_header_id => NULL
101145: );
101146:
101147: IF (C_LEVEL_ERROR>= g_log_level) THEN
101170: ----------------------------------------------------------------------------------
101171: -- 4219869 Business Flow
101172: -- Update journal entry status -- Need to generate this within IF
101173: ----------------------------------------------------------------------------------
101174: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
101175: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
101176: ,p_balance_type_code => l_balance_type_code
101177: );
101178:
101257:
101258: --
101259: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
101260: --
101261: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
101262: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
101263: ELSE
101264: ---------------------------------------------------------------------------------------------------
101265: -- 4262811a Switch Sign
101282:
101283: XLA_AE_LINES_PKG.ValidateCurrentLine;
101284: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
101285:
101286: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
101287: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
101288: ,p_balance_type_code => l_balance_type_code);
101289:
101290: END IF;
101454: l_tmp_amt NUMBER;
101455: l_acc_rev_natural_side_code VARCHAR2(1);
101456:
101457: l_num_entries NUMBER;
101458: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
101459: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
101460: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
101461: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
101462: l_recog_line_1 NUMBER;
101455: l_acc_rev_natural_side_code VARCHAR2(1);
101456:
101457: l_num_entries NUMBER;
101458: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
101459: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
101460: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
101461: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
101462: l_recog_line_1 NUMBER;
101463: l_recog_line_2 NUMBER;
101456:
101457: l_num_entries NUMBER;
101458: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
101459: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
101460: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
101461: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
101462: l_recog_line_1 NUMBER;
101463: l_recog_line_2 NUMBER;
101464:
101457: l_num_entries NUMBER;
101458: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
101459: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
101460: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
101461: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
101462: l_recog_line_1 NUMBER;
101463: l_recog_line_2 NUMBER;
101464:
101465: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
101463: l_recog_line_2 NUMBER;
101464:
101465: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
101466: l_bflow_applied_to_amt NUMBER; -- 5132302
101467: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
101468:
101469: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
101470:
101471: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
101538: l_accrual_line_num := NULL; -- 4262811
101539: l_tmp_amt := NULL; -- 4262811
101540: --
101541:
101542: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
101543: l_balance_type_code <> 'B' THEN
101544: IF NVL(p_source_33,'
101545: ') = 'MISCELLANEOUS'
101546: THEN
101610: --
101611: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
101612:
101613: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
101614: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
101615:
101616: -- 4955764
101617: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
101618: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
101736: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
101737:
101738: IF xla_accounting_cache_pkg.GetValueChar
101739: (p_source_code => 'LEDGER_CATEGORY_CODE'
101740: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
101741: AND l_bflow_method_code = 'PRIOR_ENTRY'
101742: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
101743: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
101744: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
101865: p_lookup_type => 'XLA_OWNER_TYPE'
101866: ,p_lookup_code => l_component_type_code
101867: )
101868: ,p_token_4 => 'PRODUCT_NAME'
101869: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101870: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101871: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101872: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101873: ,p_ae_header_id => NULL
101866: ,p_lookup_code => l_component_type_code
101867: )
101868: ,p_token_4 => 'PRODUCT_NAME'
101869: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101870: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101871: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101872: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101873: ,p_ae_header_id => NULL
101874: );
101867: )
101868: ,p_token_4 => 'PRODUCT_NAME'
101869: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101870: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101871: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101872: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101873: ,p_ae_header_id => NULL
101874: );
101875:
101868: ,p_token_4 => 'PRODUCT_NAME'
101869: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
101870: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
101871: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
101872: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
101873: ,p_ae_header_id => NULL
101874: );
101875:
101876: IF (C_LEVEL_ERROR>= g_log_level) THEN
101899: ----------------------------------------------------------------------------------
101900: -- 4219869 Business Flow
101901: -- Update journal entry status -- Need to generate this within IF
101902: ----------------------------------------------------------------------------------
101903: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
101904: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
101905: ,p_balance_type_code => l_balance_type_code
101906: );
101907:
101986:
101987: --
101988: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
101989: --
101990: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
101991: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
101992: ELSE
101993: ---------------------------------------------------------------------------------------------------
101994: -- 4262811a Switch Sign
102011:
102012: XLA_AE_LINES_PKG.ValidateCurrentLine;
102013: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
102014:
102015: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
102016: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
102017: ,p_balance_type_code => l_balance_type_code);
102018:
102019: END IF;
102183: l_tmp_amt NUMBER;
102184: l_acc_rev_natural_side_code VARCHAR2(1);
102185:
102186: l_num_entries NUMBER;
102187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102191: l_recog_line_1 NUMBER;
102184: l_acc_rev_natural_side_code VARCHAR2(1);
102185:
102186: l_num_entries NUMBER;
102187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102191: l_recog_line_1 NUMBER;
102192: l_recog_line_2 NUMBER;
102185:
102186: l_num_entries NUMBER;
102187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102191: l_recog_line_1 NUMBER;
102192: l_recog_line_2 NUMBER;
102193:
102186: l_num_entries NUMBER;
102187: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102188: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102189: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102190: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102191: l_recog_line_1 NUMBER;
102192: l_recog_line_2 NUMBER;
102193:
102194: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
102192: l_recog_line_2 NUMBER;
102193:
102194: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
102195: l_bflow_applied_to_amt NUMBER; -- 5132302
102196: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
102197:
102198: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
102199:
102200: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
102267: l_accrual_line_num := NULL; -- 4262811
102268: l_tmp_amt := NULL; -- 4262811
102269: --
102270:
102271: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
102272: l_balance_type_code <> 'B' THEN
102273: IF NVL(p_source_33,'
102274: ') = 'MISCELLANEOUS'
102275: THEN
102339: --
102340: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
102341:
102342: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
102343: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
102344:
102345: -- 4955764
102346: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
102347: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
102463: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
102464:
102465: IF xla_accounting_cache_pkg.GetValueChar
102466: (p_source_code => 'LEDGER_CATEGORY_CODE'
102467: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
102468: AND l_bflow_method_code = 'PRIOR_ENTRY'
102469: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
102470: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
102471: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
102592: p_lookup_type => 'XLA_OWNER_TYPE'
102593: ,p_lookup_code => l_component_type_code
102594: )
102595: ,p_token_4 => 'PRODUCT_NAME'
102596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
102597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
102598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
102599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
102600: ,p_ae_header_id => NULL
102593: ,p_lookup_code => l_component_type_code
102594: )
102595: ,p_token_4 => 'PRODUCT_NAME'
102596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
102597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
102598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
102599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
102600: ,p_ae_header_id => NULL
102601: );
102594: )
102595: ,p_token_4 => 'PRODUCT_NAME'
102596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
102597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
102598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
102599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
102600: ,p_ae_header_id => NULL
102601: );
102602:
102595: ,p_token_4 => 'PRODUCT_NAME'
102596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
102597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
102598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
102599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
102600: ,p_ae_header_id => NULL
102601: );
102602:
102603: IF (C_LEVEL_ERROR>= g_log_level) THEN
102626: ----------------------------------------------------------------------------------
102627: -- 4219869 Business Flow
102628: -- Update journal entry status -- Need to generate this within IF
102629: ----------------------------------------------------------------------------------
102630: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
102631: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
102632: ,p_balance_type_code => l_balance_type_code
102633: );
102634:
102713:
102714: --
102715: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
102716: --
102717: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
102718: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
102719: ELSE
102720: ---------------------------------------------------------------------------------------------------
102721: -- 4262811a Switch Sign
102738:
102739: XLA_AE_LINES_PKG.ValidateCurrentLine;
102740: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
102741:
102742: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
102743: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
102744: ,p_balance_type_code => l_balance_type_code);
102745:
102746: END IF;
102914: l_tmp_amt NUMBER;
102915: l_acc_rev_natural_side_code VARCHAR2(1);
102916:
102917: l_num_entries NUMBER;
102918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102922: l_recog_line_1 NUMBER;
102915: l_acc_rev_natural_side_code VARCHAR2(1);
102916:
102917: l_num_entries NUMBER;
102918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102922: l_recog_line_1 NUMBER;
102923: l_recog_line_2 NUMBER;
102916:
102917: l_num_entries NUMBER;
102918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102922: l_recog_line_1 NUMBER;
102923: l_recog_line_2 NUMBER;
102924:
102917: l_num_entries NUMBER;
102918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
102919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
102920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
102921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
102922: l_recog_line_1 NUMBER;
102923: l_recog_line_2 NUMBER;
102924:
102925: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
102923: l_recog_line_2 NUMBER;
102924:
102925: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
102926: l_bflow_applied_to_amt NUMBER; -- 5132302
102927: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
102928:
102929: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
102930:
102931: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
102998: l_accrual_line_num := NULL; -- 4262811
102999: l_tmp_amt := NULL; -- 4262811
103000: --
103001:
103002: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
103003: l_balance_type_code <> 'B' THEN
103004: IF NVL(p_source_33,'
103005: ') = 'NONREC_TAX' AND
103006: NVL(p_source_95,'
103074: --
103075: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
103076:
103077: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
103078: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
103079:
103080: -- 4955764
103081: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
103082: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
103198: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
103199:
103200: IF xla_accounting_cache_pkg.GetValueChar
103201: (p_source_code => 'LEDGER_CATEGORY_CODE'
103202: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
103203: AND l_bflow_method_code = 'PRIOR_ENTRY'
103204: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
103205: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
103206: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
103308: p_lookup_type => 'XLA_OWNER_TYPE'
103309: ,p_lookup_code => l_component_type_code
103310: )
103311: ,p_token_4 => 'PRODUCT_NAME'
103312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
103313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
103314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
103315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
103316: ,p_ae_header_id => NULL
103309: ,p_lookup_code => l_component_type_code
103310: )
103311: ,p_token_4 => 'PRODUCT_NAME'
103312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
103313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
103314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
103315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
103316: ,p_ae_header_id => NULL
103317: );
103310: )
103311: ,p_token_4 => 'PRODUCT_NAME'
103312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
103313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
103314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
103315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
103316: ,p_ae_header_id => NULL
103317: );
103318:
103311: ,p_token_4 => 'PRODUCT_NAME'
103312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
103313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
103314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
103315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
103316: ,p_ae_header_id => NULL
103317: );
103318:
103319: IF (C_LEVEL_ERROR>= g_log_level) THEN
103342: ----------------------------------------------------------------------------------
103343: -- 4219869 Business Flow
103344: -- Update journal entry status -- Need to generate this within IF
103345: ----------------------------------------------------------------------------------
103346: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
103347: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
103348: ,p_balance_type_code => l_balance_type_code
103349: );
103350:
103429:
103430: --
103431: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
103432: --
103433: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
103434: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
103435: ELSE
103436: ---------------------------------------------------------------------------------------------------
103437: -- 4262811a Switch Sign
103454:
103455: XLA_AE_LINES_PKG.ValidateCurrentLine;
103456: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
103457:
103458: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
103459: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
103460: ,p_balance_type_code => l_balance_type_code);
103461:
103462: END IF;
103628: l_tmp_amt NUMBER;
103629: l_acc_rev_natural_side_code VARCHAR2(1);
103630:
103631: l_num_entries NUMBER;
103632: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
103633: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
103634: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
103635: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
103636: l_recog_line_1 NUMBER;
103629: l_acc_rev_natural_side_code VARCHAR2(1);
103630:
103631: l_num_entries NUMBER;
103632: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
103633: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
103634: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
103635: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
103636: l_recog_line_1 NUMBER;
103637: l_recog_line_2 NUMBER;
103630:
103631: l_num_entries NUMBER;
103632: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
103633: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
103634: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
103635: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
103636: l_recog_line_1 NUMBER;
103637: l_recog_line_2 NUMBER;
103638:
103631: l_num_entries NUMBER;
103632: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
103633: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
103634: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
103635: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
103636: l_recog_line_1 NUMBER;
103637: l_recog_line_2 NUMBER;
103638:
103639: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
103637: l_recog_line_2 NUMBER;
103638:
103639: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
103640: l_bflow_applied_to_amt NUMBER; -- 5132302
103641: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
103642:
103643: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
103644:
103645: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
103712: l_accrual_line_num := NULL; -- 4262811
103713: l_tmp_amt := NULL; -- 4262811
103714: --
103715:
103716: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
103717: l_balance_type_code <> 'B' THEN
103718: IF NVL(p_source_33,'
103719: ') = 'NONREC_TAX' AND
103720: NVL(p_source_95,'
103788: --
103789: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
103790:
103791: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
103792: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
103793:
103794: -- 4955764
103795: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
103796: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
103910: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
103911:
103912: IF xla_accounting_cache_pkg.GetValueChar
103913: (p_source_code => 'LEDGER_CATEGORY_CODE'
103914: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
103915: AND l_bflow_method_code = 'PRIOR_ENTRY'
103916: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
103917: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
103918: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
104020: p_lookup_type => 'XLA_OWNER_TYPE'
104021: ,p_lookup_code => l_component_type_code
104022: )
104023: ,p_token_4 => 'PRODUCT_NAME'
104024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104028: ,p_ae_header_id => NULL
104021: ,p_lookup_code => l_component_type_code
104022: )
104023: ,p_token_4 => 'PRODUCT_NAME'
104024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104028: ,p_ae_header_id => NULL
104029: );
104022: )
104023: ,p_token_4 => 'PRODUCT_NAME'
104024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104028: ,p_ae_header_id => NULL
104029: );
104030:
104023: ,p_token_4 => 'PRODUCT_NAME'
104024: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104025: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104026: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104027: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104028: ,p_ae_header_id => NULL
104029: );
104030:
104031: IF (C_LEVEL_ERROR>= g_log_level) THEN
104054: ----------------------------------------------------------------------------------
104055: -- 4219869 Business Flow
104056: -- Update journal entry status -- Need to generate this within IF
104057: ----------------------------------------------------------------------------------
104058: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
104059: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
104060: ,p_balance_type_code => l_balance_type_code
104061: );
104062:
104141:
104142: --
104143: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
104144: --
104145: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
104146: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
104147: ELSE
104148: ---------------------------------------------------------------------------------------------------
104149: -- 4262811a Switch Sign
104166:
104167: XLA_AE_LINES_PKG.ValidateCurrentLine;
104168: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
104169:
104170: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
104171: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
104172: ,p_balance_type_code => l_balance_type_code);
104173:
104174: END IF;
104342: l_tmp_amt NUMBER;
104343: l_acc_rev_natural_side_code VARCHAR2(1);
104344:
104345: l_num_entries NUMBER;
104346: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
104347: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
104348: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
104349: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
104350: l_recog_line_1 NUMBER;
104343: l_acc_rev_natural_side_code VARCHAR2(1);
104344:
104345: l_num_entries NUMBER;
104346: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
104347: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
104348: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
104349: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
104350: l_recog_line_1 NUMBER;
104351: l_recog_line_2 NUMBER;
104344:
104345: l_num_entries NUMBER;
104346: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
104347: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
104348: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
104349: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
104350: l_recog_line_1 NUMBER;
104351: l_recog_line_2 NUMBER;
104352:
104345: l_num_entries NUMBER;
104346: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
104347: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
104348: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
104349: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
104350: l_recog_line_1 NUMBER;
104351: l_recog_line_2 NUMBER;
104352:
104353: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
104351: l_recog_line_2 NUMBER;
104352:
104353: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
104354: l_bflow_applied_to_amt NUMBER; -- 5132302
104355: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
104356:
104357: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
104358:
104359: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
104426: l_accrual_line_num := NULL; -- 4262811
104427: l_tmp_amt := NULL; -- 4262811
104428: --
104429:
104430: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
104431: l_balance_type_code <> 'B' THEN
104432: IF NVL(p_source_33,'
104433: ') = 'NONREC_TAX' AND
104434: NVL(p_source_95,'
104502: --
104503: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
104504:
104505: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
104506: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
104507:
104508: -- 4955764
104509: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
104510: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
104628: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
104629:
104630: IF xla_accounting_cache_pkg.GetValueChar
104631: (p_source_code => 'LEDGER_CATEGORY_CODE'
104632: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
104633: AND l_bflow_method_code = 'PRIOR_ENTRY'
104634: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
104635: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
104636: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
104738: p_lookup_type => 'XLA_OWNER_TYPE'
104739: ,p_lookup_code => l_component_type_code
104740: )
104741: ,p_token_4 => 'PRODUCT_NAME'
104742: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104743: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104744: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104745: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104746: ,p_ae_header_id => NULL
104739: ,p_lookup_code => l_component_type_code
104740: )
104741: ,p_token_4 => 'PRODUCT_NAME'
104742: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104743: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104744: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104745: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104746: ,p_ae_header_id => NULL
104747: );
104740: )
104741: ,p_token_4 => 'PRODUCT_NAME'
104742: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104743: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104744: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104745: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104746: ,p_ae_header_id => NULL
104747: );
104748:
104741: ,p_token_4 => 'PRODUCT_NAME'
104742: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
104743: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
104744: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
104745: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
104746: ,p_ae_header_id => NULL
104747: );
104748:
104749: IF (C_LEVEL_ERROR>= g_log_level) THEN
104772: ----------------------------------------------------------------------------------
104773: -- 4219869 Business Flow
104774: -- Update journal entry status -- Need to generate this within IF
104775: ----------------------------------------------------------------------------------
104776: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
104777: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
104778: ,p_balance_type_code => l_balance_type_code
104779: );
104780:
104859:
104860: --
104861: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
104862: --
104863: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
104864: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
104865: ELSE
104866: ---------------------------------------------------------------------------------------------------
104867: -- 4262811a Switch Sign
104884:
104885: XLA_AE_LINES_PKG.ValidateCurrentLine;
104886: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
104887:
104888: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
104889: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
104890: ,p_balance_type_code => l_balance_type_code);
104891:
104892: END IF;
105060: l_tmp_amt NUMBER;
105061: l_acc_rev_natural_side_code VARCHAR2(1);
105062:
105063: l_num_entries NUMBER;
105064: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105065: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105066: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105067: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105068: l_recog_line_1 NUMBER;
105061: l_acc_rev_natural_side_code VARCHAR2(1);
105062:
105063: l_num_entries NUMBER;
105064: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105065: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105066: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105067: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105068: l_recog_line_1 NUMBER;
105069: l_recog_line_2 NUMBER;
105062:
105063: l_num_entries NUMBER;
105064: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105065: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105066: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105067: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105068: l_recog_line_1 NUMBER;
105069: l_recog_line_2 NUMBER;
105070:
105063: l_num_entries NUMBER;
105064: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105065: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105066: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105067: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105068: l_recog_line_1 NUMBER;
105069: l_recog_line_2 NUMBER;
105070:
105071: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
105069: l_recog_line_2 NUMBER;
105070:
105071: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
105072: l_bflow_applied_to_amt NUMBER; -- 5132302
105073: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
105074:
105075: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
105076:
105077: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
105144: l_accrual_line_num := NULL; -- 4262811
105145: l_tmp_amt := NULL; -- 4262811
105146: --
105147:
105148: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
105149: l_balance_type_code <> 'B' THEN
105150: IF (NVL(p_source_33,'
105151: ') = 'NONREC_TAX' OR
105152: NVL(p_source_33,'
105226: --
105227: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
105228:
105229: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
105230: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
105231:
105232: -- 4955764
105233: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
105234: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
105350: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
105351:
105352: IF xla_accounting_cache_pkg.GetValueChar
105353: (p_source_code => 'LEDGER_CATEGORY_CODE'
105354: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
105355: AND l_bflow_method_code = 'PRIOR_ENTRY'
105356: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
105357: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
105358: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
105460: p_lookup_type => 'XLA_OWNER_TYPE'
105461: ,p_lookup_code => l_component_type_code
105462: )
105463: ,p_token_4 => 'PRODUCT_NAME'
105464: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
105465: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
105466: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
105467: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
105468: ,p_ae_header_id => NULL
105461: ,p_lookup_code => l_component_type_code
105462: )
105463: ,p_token_4 => 'PRODUCT_NAME'
105464: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
105465: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
105466: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
105467: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
105468: ,p_ae_header_id => NULL
105469: );
105462: )
105463: ,p_token_4 => 'PRODUCT_NAME'
105464: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
105465: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
105466: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
105467: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
105468: ,p_ae_header_id => NULL
105469: );
105470:
105463: ,p_token_4 => 'PRODUCT_NAME'
105464: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
105465: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
105466: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
105467: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
105468: ,p_ae_header_id => NULL
105469: );
105470:
105471: IF (C_LEVEL_ERROR>= g_log_level) THEN
105494: ----------------------------------------------------------------------------------
105495: -- 4219869 Business Flow
105496: -- Update journal entry status -- Need to generate this within IF
105497: ----------------------------------------------------------------------------------
105498: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
105499: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
105500: ,p_balance_type_code => l_balance_type_code
105501: );
105502:
105581:
105582: --
105583: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
105584: --
105585: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
105586: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
105587: ELSE
105588: ---------------------------------------------------------------------------------------------------
105589: -- 4262811a Switch Sign
105606:
105607: XLA_AE_LINES_PKG.ValidateCurrentLine;
105608: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
105609:
105610: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
105611: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
105612: ,p_balance_type_code => l_balance_type_code);
105613:
105614: END IF;
105780: l_tmp_amt NUMBER;
105781: l_acc_rev_natural_side_code VARCHAR2(1);
105782:
105783: l_num_entries NUMBER;
105784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105788: l_recog_line_1 NUMBER;
105781: l_acc_rev_natural_side_code VARCHAR2(1);
105782:
105783: l_num_entries NUMBER;
105784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105788: l_recog_line_1 NUMBER;
105789: l_recog_line_2 NUMBER;
105782:
105783: l_num_entries NUMBER;
105784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105788: l_recog_line_1 NUMBER;
105789: l_recog_line_2 NUMBER;
105790:
105783: l_num_entries NUMBER;
105784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
105785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
105786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
105787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
105788: l_recog_line_1 NUMBER;
105789: l_recog_line_2 NUMBER;
105790:
105791: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
105789: l_recog_line_2 NUMBER;
105790:
105791: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
105792: l_bflow_applied_to_amt NUMBER; -- 5132302
105793: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
105794:
105795: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
105796:
105797: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
105864: l_accrual_line_num := NULL; -- 4262811
105865: l_tmp_amt := NULL; -- 4262811
105866: --
105867:
105868: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
105869: l_balance_type_code <> 'B' THEN
105870: IF (NVL(p_source_33,'
105871: ') = 'NONREC_TAX' OR
105872: NVL(p_source_33,'
105946: --
105947: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
105948:
105949: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
105950: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
105951:
105952: -- 4955764
105953: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
105954: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
106068: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
106069:
106070: IF xla_accounting_cache_pkg.GetValueChar
106071: (p_source_code => 'LEDGER_CATEGORY_CODE'
106072: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
106073: AND l_bflow_method_code = 'PRIOR_ENTRY'
106074: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
106075: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
106076: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
106178: p_lookup_type => 'XLA_OWNER_TYPE'
106179: ,p_lookup_code => l_component_type_code
106180: )
106181: ,p_token_4 => 'PRODUCT_NAME'
106182: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106183: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106184: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106185: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106186: ,p_ae_header_id => NULL
106179: ,p_lookup_code => l_component_type_code
106180: )
106181: ,p_token_4 => 'PRODUCT_NAME'
106182: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106183: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106184: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106185: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106186: ,p_ae_header_id => NULL
106187: );
106180: )
106181: ,p_token_4 => 'PRODUCT_NAME'
106182: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106183: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106184: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106185: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106186: ,p_ae_header_id => NULL
106187: );
106188:
106181: ,p_token_4 => 'PRODUCT_NAME'
106182: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106183: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106184: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106185: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106186: ,p_ae_header_id => NULL
106187: );
106188:
106189: IF (C_LEVEL_ERROR>= g_log_level) THEN
106212: ----------------------------------------------------------------------------------
106213: -- 4219869 Business Flow
106214: -- Update journal entry status -- Need to generate this within IF
106215: ----------------------------------------------------------------------------------
106216: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
106217: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
106218: ,p_balance_type_code => l_balance_type_code
106219: );
106220:
106299:
106300: --
106301: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
106302: --
106303: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
106304: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
106305: ELSE
106306: ---------------------------------------------------------------------------------------------------
106307: -- 4262811a Switch Sign
106324:
106325: XLA_AE_LINES_PKG.ValidateCurrentLine;
106326: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
106327:
106328: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
106329: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
106330: ,p_balance_type_code => l_balance_type_code);
106331:
106332: END IF;
106500: l_tmp_amt NUMBER;
106501: l_acc_rev_natural_side_code VARCHAR2(1);
106502:
106503: l_num_entries NUMBER;
106504: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
106505: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
106506: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
106507: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
106508: l_recog_line_1 NUMBER;
106501: l_acc_rev_natural_side_code VARCHAR2(1);
106502:
106503: l_num_entries NUMBER;
106504: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
106505: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
106506: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
106507: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
106508: l_recog_line_1 NUMBER;
106509: l_recog_line_2 NUMBER;
106502:
106503: l_num_entries NUMBER;
106504: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
106505: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
106506: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
106507: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
106508: l_recog_line_1 NUMBER;
106509: l_recog_line_2 NUMBER;
106510:
106503: l_num_entries NUMBER;
106504: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
106505: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
106506: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
106507: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
106508: l_recog_line_1 NUMBER;
106509: l_recog_line_2 NUMBER;
106510:
106511: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
106509: l_recog_line_2 NUMBER;
106510:
106511: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
106512: l_bflow_applied_to_amt NUMBER; -- 5132302
106513: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
106514:
106515: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
106516:
106517: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
106584: l_accrual_line_num := NULL; -- 4262811
106585: l_tmp_amt := NULL; -- 4262811
106586: --
106587:
106588: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
106589: l_balance_type_code <> 'B' THEN
106590: IF (NVL(p_source_33,'
106591: ') = 'NONREC_TAX' OR
106592: NVL(p_source_33,'
106666: --
106667: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
106668:
106669: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
106670: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
106671:
106672: -- 4955764
106673: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
106674: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
106792: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
106793:
106794: IF xla_accounting_cache_pkg.GetValueChar
106795: (p_source_code => 'LEDGER_CATEGORY_CODE'
106796: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
106797: AND l_bflow_method_code = 'PRIOR_ENTRY'
106798: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
106799: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
106800: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
106902: p_lookup_type => 'XLA_OWNER_TYPE'
106903: ,p_lookup_code => l_component_type_code
106904: )
106905: ,p_token_4 => 'PRODUCT_NAME'
106906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106910: ,p_ae_header_id => NULL
106903: ,p_lookup_code => l_component_type_code
106904: )
106905: ,p_token_4 => 'PRODUCT_NAME'
106906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106910: ,p_ae_header_id => NULL
106911: );
106904: )
106905: ,p_token_4 => 'PRODUCT_NAME'
106906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106910: ,p_ae_header_id => NULL
106911: );
106912:
106905: ,p_token_4 => 'PRODUCT_NAME'
106906: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
106907: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
106908: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
106909: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
106910: ,p_ae_header_id => NULL
106911: );
106912:
106913: IF (C_LEVEL_ERROR>= g_log_level) THEN
106936: ----------------------------------------------------------------------------------
106937: -- 4219869 Business Flow
106938: -- Update journal entry status -- Need to generate this within IF
106939: ----------------------------------------------------------------------------------
106940: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
106941: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
106942: ,p_balance_type_code => l_balance_type_code
106943: );
106944:
107023:
107024: --
107025: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
107026: --
107027: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
107028: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
107029: ELSE
107030: ---------------------------------------------------------------------------------------------------
107031: -- 4262811a Switch Sign
107048:
107049: XLA_AE_LINES_PKG.ValidateCurrentLine;
107050: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
107051:
107052: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
107053: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
107054: ,p_balance_type_code => l_balance_type_code);
107055:
107056: END IF;
107224: l_tmp_amt NUMBER;
107225: l_acc_rev_natural_side_code VARCHAR2(1);
107226:
107227: l_num_entries NUMBER;
107228: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107229: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107230: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107231: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107232: l_recog_line_1 NUMBER;
107225: l_acc_rev_natural_side_code VARCHAR2(1);
107226:
107227: l_num_entries NUMBER;
107228: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107229: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107230: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107231: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107232: l_recog_line_1 NUMBER;
107233: l_recog_line_2 NUMBER;
107226:
107227: l_num_entries NUMBER;
107228: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107229: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107230: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107231: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107232: l_recog_line_1 NUMBER;
107233: l_recog_line_2 NUMBER;
107234:
107227: l_num_entries NUMBER;
107228: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107229: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107230: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107231: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107232: l_recog_line_1 NUMBER;
107233: l_recog_line_2 NUMBER;
107234:
107235: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
107233: l_recog_line_2 NUMBER;
107234:
107235: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
107236: l_bflow_applied_to_amt NUMBER; -- 5132302
107237: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
107238:
107239: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
107240:
107241: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
107308: l_accrual_line_num := NULL; -- 4262811
107309: l_tmp_amt := NULL; -- 4262811
107310: --
107311:
107312: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
107313: l_balance_type_code <> 'B' THEN
107314: IF (NVL(p_source_33,'
107315: ') = 'NONREC_TAX' OR
107316: NVL(p_source_33,'
107390: --
107391: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
107392:
107393: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
107394: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
107395:
107396: -- 4955764
107397: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
107398: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
107514: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
107515:
107516: IF xla_accounting_cache_pkg.GetValueChar
107517: (p_source_code => 'LEDGER_CATEGORY_CODE'
107518: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
107519: AND l_bflow_method_code = 'PRIOR_ENTRY'
107520: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
107521: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
107522: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
107624: p_lookup_type => 'XLA_OWNER_TYPE'
107625: ,p_lookup_code => l_component_type_code
107626: )
107627: ,p_token_4 => 'PRODUCT_NAME'
107628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
107629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
107630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
107631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
107632: ,p_ae_header_id => NULL
107625: ,p_lookup_code => l_component_type_code
107626: )
107627: ,p_token_4 => 'PRODUCT_NAME'
107628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
107629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
107630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
107631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
107632: ,p_ae_header_id => NULL
107633: );
107626: )
107627: ,p_token_4 => 'PRODUCT_NAME'
107628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
107629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
107630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
107631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
107632: ,p_ae_header_id => NULL
107633: );
107634:
107627: ,p_token_4 => 'PRODUCT_NAME'
107628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
107629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
107630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
107631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
107632: ,p_ae_header_id => NULL
107633: );
107634:
107635: IF (C_LEVEL_ERROR>= g_log_level) THEN
107658: ----------------------------------------------------------------------------------
107659: -- 4219869 Business Flow
107660: -- Update journal entry status -- Need to generate this within IF
107661: ----------------------------------------------------------------------------------
107662: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
107663: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
107664: ,p_balance_type_code => l_balance_type_code
107665: );
107666:
107745:
107746: --
107747: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
107748: --
107749: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
107750: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
107751: ELSE
107752: ---------------------------------------------------------------------------------------------------
107753: -- 4262811a Switch Sign
107770:
107771: XLA_AE_LINES_PKG.ValidateCurrentLine;
107772: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
107773:
107774: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
107775: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
107776: ,p_balance_type_code => l_balance_type_code);
107777:
107778: END IF;
107946: l_tmp_amt NUMBER;
107947: l_acc_rev_natural_side_code VARCHAR2(1);
107948:
107949: l_num_entries NUMBER;
107950: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107951: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107952: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107953: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107954: l_recog_line_1 NUMBER;
107947: l_acc_rev_natural_side_code VARCHAR2(1);
107948:
107949: l_num_entries NUMBER;
107950: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107951: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107952: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107953: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107954: l_recog_line_1 NUMBER;
107955: l_recog_line_2 NUMBER;
107948:
107949: l_num_entries NUMBER;
107950: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107951: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107952: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107953: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107954: l_recog_line_1 NUMBER;
107955: l_recog_line_2 NUMBER;
107956:
107949: l_num_entries NUMBER;
107950: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
107951: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
107952: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
107953: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
107954: l_recog_line_1 NUMBER;
107955: l_recog_line_2 NUMBER;
107956:
107957: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
107955: l_recog_line_2 NUMBER;
107956:
107957: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
107958: l_bflow_applied_to_amt NUMBER; -- 5132302
107959: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
107960:
107961: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
107962:
107963: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
108030: l_accrual_line_num := NULL; -- 4262811
108031: l_tmp_amt := NULL; -- 4262811
108032: --
108033:
108034: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
108035: l_balance_type_code <> 'B' THEN
108036: IF NVL(p_source_33,'
108037: ') = 'NONREC_TAX' AND
108038: NVL(p_source_95,'
108106: --
108107: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
108108:
108109: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
108110: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
108111:
108112: -- 4955764
108113: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
108114: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
108230: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
108231:
108232: IF xla_accounting_cache_pkg.GetValueChar
108233: (p_source_code => 'LEDGER_CATEGORY_CODE'
108234: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
108235: AND l_bflow_method_code = 'PRIOR_ENTRY'
108236: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
108237: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
108238: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
108340: p_lookup_type => 'XLA_OWNER_TYPE'
108341: ,p_lookup_code => l_component_type_code
108342: )
108343: ,p_token_4 => 'PRODUCT_NAME'
108344: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108345: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108346: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108347: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108348: ,p_ae_header_id => NULL
108341: ,p_lookup_code => l_component_type_code
108342: )
108343: ,p_token_4 => 'PRODUCT_NAME'
108344: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108345: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108346: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108347: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108348: ,p_ae_header_id => NULL
108349: );
108342: )
108343: ,p_token_4 => 'PRODUCT_NAME'
108344: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108345: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108346: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108347: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108348: ,p_ae_header_id => NULL
108349: );
108350:
108343: ,p_token_4 => 'PRODUCT_NAME'
108344: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108345: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108346: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108347: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108348: ,p_ae_header_id => NULL
108349: );
108350:
108351: IF (C_LEVEL_ERROR>= g_log_level) THEN
108374: ----------------------------------------------------------------------------------
108375: -- 4219869 Business Flow
108376: -- Update journal entry status -- Need to generate this within IF
108377: ----------------------------------------------------------------------------------
108378: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
108379: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
108380: ,p_balance_type_code => l_balance_type_code
108381: );
108382:
108461:
108462: --
108463: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
108464: --
108465: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
108466: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
108467: ELSE
108468: ---------------------------------------------------------------------------------------------------
108469: -- 4262811a Switch Sign
108486:
108487: XLA_AE_LINES_PKG.ValidateCurrentLine;
108488: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
108489:
108490: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
108491: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
108492: ,p_balance_type_code => l_balance_type_code);
108493:
108494: END IF;
108633: l_tmp_amt NUMBER;
108634: l_acc_rev_natural_side_code VARCHAR2(1);
108635:
108636: l_num_entries NUMBER;
108637: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
108638: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
108639: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
108640: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
108641: l_recog_line_1 NUMBER;
108634: l_acc_rev_natural_side_code VARCHAR2(1);
108635:
108636: l_num_entries NUMBER;
108637: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
108638: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
108639: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
108640: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
108641: l_recog_line_1 NUMBER;
108642: l_recog_line_2 NUMBER;
108635:
108636: l_num_entries NUMBER;
108637: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
108638: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
108639: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
108640: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
108641: l_recog_line_1 NUMBER;
108642: l_recog_line_2 NUMBER;
108643:
108636: l_num_entries NUMBER;
108637: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
108638: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
108639: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
108640: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
108641: l_recog_line_1 NUMBER;
108642: l_recog_line_2 NUMBER;
108643:
108644: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
108642: l_recog_line_2 NUMBER;
108643:
108644: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
108645: l_bflow_applied_to_amt NUMBER; -- 5132302
108646: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
108647:
108648: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
108649:
108650: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
108717: l_accrual_line_num := NULL; -- 4262811
108718: l_tmp_amt := NULL; -- 4262811
108719: --
108720:
108721: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
108722: l_balance_type_code <> 'B' THEN
108723: IF (NVL(p_source_96,'
108724: ') = 'ALWAYS_ALWAYS' OR
108725: NVL(p_source_96,'
108794: --
108795: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
108796:
108797: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
108798: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
108799:
108800: -- 4955764
108801: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
108802: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
108870: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
108871:
108872: IF xla_accounting_cache_pkg.GetValueChar
108873: (p_source_code => 'LEDGER_CATEGORY_CODE'
108874: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
108875: AND l_bflow_method_code = 'PRIOR_ENTRY'
108876: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
108877: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
108878: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
108991: p_lookup_type => 'XLA_OWNER_TYPE'
108992: ,p_lookup_code => l_component_type_code
108993: )
108994: ,p_token_4 => 'PRODUCT_NAME'
108995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108999: ,p_ae_header_id => NULL
108992: ,p_lookup_code => l_component_type_code
108993: )
108994: ,p_token_4 => 'PRODUCT_NAME'
108995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108999: ,p_ae_header_id => NULL
109000: );
108993: )
108994: ,p_token_4 => 'PRODUCT_NAME'
108995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108999: ,p_ae_header_id => NULL
109000: );
109001:
108994: ,p_token_4 => 'PRODUCT_NAME'
108995: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
108996: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
108997: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
108998: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
108999: ,p_ae_header_id => NULL
109000: );
109001:
109002: IF (C_LEVEL_ERROR>= g_log_level) THEN
109025: ----------------------------------------------------------------------------------
109026: -- 4219869 Business Flow
109027: -- Update journal entry status -- Need to generate this within IF
109028: ----------------------------------------------------------------------------------
109029: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
109030: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
109031: ,p_balance_type_code => l_balance_type_code
109032: );
109033:
109115:
109116: --
109117: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
109118: --
109119: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
109120: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
109121: ELSE
109122: ---------------------------------------------------------------------------------------------------
109123: -- 4262811a Switch Sign
109140:
109141: XLA_AE_LINES_PKG.ValidateCurrentLine;
109142: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
109143:
109144: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
109145: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
109146: ,p_balance_type_code => l_balance_type_code);
109147:
109148: END IF;
109320: l_tmp_amt NUMBER;
109321: l_acc_rev_natural_side_code VARCHAR2(1);
109322:
109323: l_num_entries NUMBER;
109324: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
109325: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
109326: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
109327: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
109328: l_recog_line_1 NUMBER;
109321: l_acc_rev_natural_side_code VARCHAR2(1);
109322:
109323: l_num_entries NUMBER;
109324: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
109325: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
109326: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
109327: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
109328: l_recog_line_1 NUMBER;
109329: l_recog_line_2 NUMBER;
109322:
109323: l_num_entries NUMBER;
109324: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
109325: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
109326: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
109327: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
109328: l_recog_line_1 NUMBER;
109329: l_recog_line_2 NUMBER;
109330:
109323: l_num_entries NUMBER;
109324: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
109325: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
109326: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
109327: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
109328: l_recog_line_1 NUMBER;
109329: l_recog_line_2 NUMBER;
109330:
109331: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
109329: l_recog_line_2 NUMBER;
109330:
109331: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
109332: l_bflow_applied_to_amt NUMBER; -- 5132302
109333: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
109334:
109335: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
109336:
109337: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
109404: l_accrual_line_num := NULL; -- 4262811
109405: l_tmp_amt := NULL; -- 4262811
109406: --
109407:
109408: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
109409: l_balance_type_code <> 'B' THEN
109410: IF NVL(p_source_33,'
109411: ') = 'RETROEXPENSE' OR
109412: NVL(p_source_33,'
109486: --
109487: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
109488:
109489: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
109490: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
109491:
109492: -- 4955764
109493: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
109494: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
109610: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
109611:
109612: IF xla_accounting_cache_pkg.GetValueChar
109613: (p_source_code => 'LEDGER_CATEGORY_CODE'
109614: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
109615: AND l_bflow_method_code = 'PRIOR_ENTRY'
109616: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
109617: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
109618: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
109772: p_lookup_type => 'XLA_OWNER_TYPE'
109773: ,p_lookup_code => l_component_type_code
109774: )
109775: ,p_token_4 => 'PRODUCT_NAME'
109776: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
109777: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
109778: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
109779: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
109780: ,p_ae_header_id => NULL
109773: ,p_lookup_code => l_component_type_code
109774: )
109775: ,p_token_4 => 'PRODUCT_NAME'
109776: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
109777: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
109778: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
109779: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
109780: ,p_ae_header_id => NULL
109781: );
109774: )
109775: ,p_token_4 => 'PRODUCT_NAME'
109776: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
109777: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
109778: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
109779: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
109780: ,p_ae_header_id => NULL
109781: );
109782:
109775: ,p_token_4 => 'PRODUCT_NAME'
109776: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
109777: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
109778: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
109779: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
109780: ,p_ae_header_id => NULL
109781: );
109782:
109783: IF (C_LEVEL_ERROR>= g_log_level) THEN
109806: ----------------------------------------------------------------------------------
109807: -- 4219869 Business Flow
109808: -- Update journal entry status -- Need to generate this within IF
109809: ----------------------------------------------------------------------------------
109810: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
109811: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
109812: ,p_balance_type_code => l_balance_type_code
109813: );
109814:
109945:
109946: --
109947: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
109948: --
109949: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
109950: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
109951: ELSE
109952: ---------------------------------------------------------------------------------------------------
109953: -- 4262811a Switch Sign
109970:
109971: XLA_AE_LINES_PKG.ValidateCurrentLine;
109972: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
109973:
109974: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
109975: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
109976: ,p_balance_type_code => l_balance_type_code);
109977:
109978: END IF;
110128: l_tmp_amt NUMBER;
110129: l_acc_rev_natural_side_code VARCHAR2(1);
110130:
110131: l_num_entries NUMBER;
110132: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110133: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110134: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110135: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110136: l_recog_line_1 NUMBER;
110129: l_acc_rev_natural_side_code VARCHAR2(1);
110130:
110131: l_num_entries NUMBER;
110132: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110133: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110134: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110135: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110136: l_recog_line_1 NUMBER;
110137: l_recog_line_2 NUMBER;
110130:
110131: l_num_entries NUMBER;
110132: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110133: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110134: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110135: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110136: l_recog_line_1 NUMBER;
110137: l_recog_line_2 NUMBER;
110138:
110131: l_num_entries NUMBER;
110132: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110133: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110134: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110135: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110136: l_recog_line_1 NUMBER;
110137: l_recog_line_2 NUMBER;
110138:
110139: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
110137: l_recog_line_2 NUMBER;
110138:
110139: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
110140: l_bflow_applied_to_amt NUMBER; -- 5132302
110141: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
110142:
110143: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
110144:
110145: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
110212: l_accrual_line_num := NULL; -- 4262811
110213: l_tmp_amt := NULL; -- 4262811
110214: --
110215:
110216: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
110217: l_balance_type_code <> 'B' THEN
110218: IF NVL(p_source_143,'
110219: ') = 'PREPAY APPL' OR
110220: NVL(p_source_143,'
110294: --
110295: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
110296:
110297: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
110298: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
110299:
110300: -- 4955764
110301: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
110302: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
110410: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
110411:
110412: IF xla_accounting_cache_pkg.GetValueChar
110413: (p_source_code => 'LEDGER_CATEGORY_CODE'
110414: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
110415: AND l_bflow_method_code = 'PRIOR_ENTRY'
110416: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
110417: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
110418: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
110487: p_lookup_type => 'XLA_OWNER_TYPE'
110488: ,p_lookup_code => l_component_type_code
110489: )
110490: ,p_token_4 => 'PRODUCT_NAME'
110491: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
110492: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
110493: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
110494: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
110495: ,p_ae_header_id => NULL
110488: ,p_lookup_code => l_component_type_code
110489: )
110490: ,p_token_4 => 'PRODUCT_NAME'
110491: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
110492: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
110493: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
110494: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
110495: ,p_ae_header_id => NULL
110496: );
110489: )
110490: ,p_token_4 => 'PRODUCT_NAME'
110491: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
110492: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
110493: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
110494: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
110495: ,p_ae_header_id => NULL
110496: );
110497:
110490: ,p_token_4 => 'PRODUCT_NAME'
110491: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
110492: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
110493: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
110494: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
110495: ,p_ae_header_id => NULL
110496: );
110497:
110498: IF (C_LEVEL_ERROR>= g_log_level) THEN
110521: ----------------------------------------------------------------------------------
110522: -- 4219869 Business Flow
110523: -- Update journal entry status -- Need to generate this within IF
110524: ----------------------------------------------------------------------------------
110525: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
110526: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
110527: ,p_balance_type_code => l_balance_type_code
110528: );
110529:
110582:
110583: --
110584: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
110585: --
110586: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
110587: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
110588: ELSE
110589: ---------------------------------------------------------------------------------------------------
110590: -- 4262811a Switch Sign
110607:
110608: XLA_AE_LINES_PKG.ValidateCurrentLine;
110609: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
110610:
110611: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
110612: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
110613: ,p_balance_type_code => l_balance_type_code);
110614:
110615: END IF;
110780: l_tmp_amt NUMBER;
110781: l_acc_rev_natural_side_code VARCHAR2(1);
110782:
110783: l_num_entries NUMBER;
110784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110788: l_recog_line_1 NUMBER;
110781: l_acc_rev_natural_side_code VARCHAR2(1);
110782:
110783: l_num_entries NUMBER;
110784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110788: l_recog_line_1 NUMBER;
110789: l_recog_line_2 NUMBER;
110782:
110783: l_num_entries NUMBER;
110784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110788: l_recog_line_1 NUMBER;
110789: l_recog_line_2 NUMBER;
110790:
110783: l_num_entries NUMBER;
110784: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
110785: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
110786: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
110787: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
110788: l_recog_line_1 NUMBER;
110789: l_recog_line_2 NUMBER;
110790:
110791: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
110789: l_recog_line_2 NUMBER;
110790:
110791: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
110792: l_bflow_applied_to_amt NUMBER; -- 5132302
110793: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
110794:
110795: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
110796:
110797: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
110864: l_accrual_line_num := NULL; -- 4262811
110865: l_tmp_amt := NULL; -- 4262811
110866: --
110867:
110868: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
110869: l_balance_type_code <> 'B' THEN
110870: IF NVL(p_source_33,'
110871: ') = 'REC_TAX' AND
110872: NVL(p_source_135,'
110938: --
110939: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
110940:
110941: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
110942: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
110943:
110944: -- 4955764
110945: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
110946: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
111062: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
111063:
111064: IF xla_accounting_cache_pkg.GetValueChar
111065: (p_source_code => 'LEDGER_CATEGORY_CODE'
111066: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
111067: AND l_bflow_method_code = 'PRIOR_ENTRY'
111068: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
111069: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
111070: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
111172: p_lookup_type => 'XLA_OWNER_TYPE'
111173: ,p_lookup_code => l_component_type_code
111174: )
111175: ,p_token_4 => 'PRODUCT_NAME'
111176: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111177: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111178: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111179: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111180: ,p_ae_header_id => NULL
111173: ,p_lookup_code => l_component_type_code
111174: )
111175: ,p_token_4 => 'PRODUCT_NAME'
111176: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111177: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111178: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111179: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111180: ,p_ae_header_id => NULL
111181: );
111174: )
111175: ,p_token_4 => 'PRODUCT_NAME'
111176: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111177: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111178: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111179: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111180: ,p_ae_header_id => NULL
111181: );
111182:
111175: ,p_token_4 => 'PRODUCT_NAME'
111176: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111177: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111178: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111179: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111180: ,p_ae_header_id => NULL
111181: );
111182:
111183: IF (C_LEVEL_ERROR>= g_log_level) THEN
111206: ----------------------------------------------------------------------------------
111207: -- 4219869 Business Flow
111208: -- Update journal entry status -- Need to generate this within IF
111209: ----------------------------------------------------------------------------------
111210: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
111211: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
111212: ,p_balance_type_code => l_balance_type_code
111213: );
111214:
111293:
111294: --
111295: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
111296: --
111297: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
111298: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
111299: ELSE
111300: ---------------------------------------------------------------------------------------------------
111301: -- 4262811a Switch Sign
111318:
111319: XLA_AE_LINES_PKG.ValidateCurrentLine;
111320: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
111321:
111322: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
111323: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
111324: ,p_balance_type_code => l_balance_type_code);
111325:
111326: END IF;
111489: l_tmp_amt NUMBER;
111490: l_acc_rev_natural_side_code VARCHAR2(1);
111491:
111492: l_num_entries NUMBER;
111493: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
111494: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
111495: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
111496: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
111497: l_recog_line_1 NUMBER;
111490: l_acc_rev_natural_side_code VARCHAR2(1);
111491:
111492: l_num_entries NUMBER;
111493: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
111494: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
111495: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
111496: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
111497: l_recog_line_1 NUMBER;
111498: l_recog_line_2 NUMBER;
111491:
111492: l_num_entries NUMBER;
111493: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
111494: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
111495: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
111496: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
111497: l_recog_line_1 NUMBER;
111498: l_recog_line_2 NUMBER;
111499:
111492: l_num_entries NUMBER;
111493: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
111494: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
111495: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
111496: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
111497: l_recog_line_1 NUMBER;
111498: l_recog_line_2 NUMBER;
111499:
111500: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
111498: l_recog_line_2 NUMBER;
111499:
111500: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
111501: l_bflow_applied_to_amt NUMBER; -- 5132302
111502: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
111503:
111504: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
111505:
111506: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
111573: l_accrual_line_num := NULL; -- 4262811
111574: l_tmp_amt := NULL; -- 4262811
111575: --
111576:
111577: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
111578: l_balance_type_code <> 'B' THEN
111579: IF NVL(p_source_33,'
111580: ') = 'REC_TAX' AND
111581: NVL(p_source_135,'
111647: --
111648: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
111649:
111650: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
111651: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
111652:
111653: -- 4955764
111654: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
111655: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
111769: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
111770:
111771: IF xla_accounting_cache_pkg.GetValueChar
111772: (p_source_code => 'LEDGER_CATEGORY_CODE'
111773: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
111774: AND l_bflow_method_code = 'PRIOR_ENTRY'
111775: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
111776: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
111777: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
111879: p_lookup_type => 'XLA_OWNER_TYPE'
111880: ,p_lookup_code => l_component_type_code
111881: )
111882: ,p_token_4 => 'PRODUCT_NAME'
111883: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111884: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111885: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111886: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111887: ,p_ae_header_id => NULL
111880: ,p_lookup_code => l_component_type_code
111881: )
111882: ,p_token_4 => 'PRODUCT_NAME'
111883: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111884: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111885: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111886: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111887: ,p_ae_header_id => NULL
111888: );
111881: )
111882: ,p_token_4 => 'PRODUCT_NAME'
111883: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111884: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111885: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111886: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111887: ,p_ae_header_id => NULL
111888: );
111889:
111882: ,p_token_4 => 'PRODUCT_NAME'
111883: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
111884: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
111885: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
111886: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
111887: ,p_ae_header_id => NULL
111888: );
111889:
111890: IF (C_LEVEL_ERROR>= g_log_level) THEN
111913: ----------------------------------------------------------------------------------
111914: -- 4219869 Business Flow
111915: -- Update journal entry status -- Need to generate this within IF
111916: ----------------------------------------------------------------------------------
111917: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
111918: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
111919: ,p_balance_type_code => l_balance_type_code
111920: );
111921:
112000:
112001: --
112002: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
112003: --
112004: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
112005: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
112006: ELSE
112007: ---------------------------------------------------------------------------------------------------
112008: -- 4262811a Switch Sign
112025:
112026: XLA_AE_LINES_PKG.ValidateCurrentLine;
112027: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
112028:
112029: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
112030: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
112031: ,p_balance_type_code => l_balance_type_code);
112032:
112033: END IF;
112198: l_tmp_amt NUMBER;
112199: l_acc_rev_natural_side_code VARCHAR2(1);
112200:
112201: l_num_entries NUMBER;
112202: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112203: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112204: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112205: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112206: l_recog_line_1 NUMBER;
112199: l_acc_rev_natural_side_code VARCHAR2(1);
112200:
112201: l_num_entries NUMBER;
112202: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112203: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112204: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112205: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112206: l_recog_line_1 NUMBER;
112207: l_recog_line_2 NUMBER;
112200:
112201: l_num_entries NUMBER;
112202: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112203: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112204: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112205: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112206: l_recog_line_1 NUMBER;
112207: l_recog_line_2 NUMBER;
112208:
112201: l_num_entries NUMBER;
112202: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112203: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112204: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112205: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112206: l_recog_line_1 NUMBER;
112207: l_recog_line_2 NUMBER;
112208:
112209: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
112207: l_recog_line_2 NUMBER;
112208:
112209: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
112210: l_bflow_applied_to_amt NUMBER; -- 5132302
112211: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
112212:
112213: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
112214:
112215: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
112282: l_accrual_line_num := NULL; -- 4262811
112283: l_tmp_amt := NULL; -- 4262811
112284: --
112285:
112286: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
112287: l_balance_type_code <> 'B' THEN
112288: IF NVL(p_source_33,'
112289: ') = 'REC_TAX' AND
112290: NVL(p_source_135,'
112356: --
112357: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
112358:
112359: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
112360: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
112361:
112362: -- 4955764
112363: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
112364: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
112482: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
112483:
112484: IF xla_accounting_cache_pkg.GetValueChar
112485: (p_source_code => 'LEDGER_CATEGORY_CODE'
112486: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
112487: AND l_bflow_method_code = 'PRIOR_ENTRY'
112488: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
112489: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
112490: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
112592: p_lookup_type => 'XLA_OWNER_TYPE'
112593: ,p_lookup_code => l_component_type_code
112594: )
112595: ,p_token_4 => 'PRODUCT_NAME'
112596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
112597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
112598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
112599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
112600: ,p_ae_header_id => NULL
112593: ,p_lookup_code => l_component_type_code
112594: )
112595: ,p_token_4 => 'PRODUCT_NAME'
112596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
112597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
112598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
112599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
112600: ,p_ae_header_id => NULL
112601: );
112594: )
112595: ,p_token_4 => 'PRODUCT_NAME'
112596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
112597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
112598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
112599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
112600: ,p_ae_header_id => NULL
112601: );
112602:
112595: ,p_token_4 => 'PRODUCT_NAME'
112596: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
112597: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
112598: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
112599: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
112600: ,p_ae_header_id => NULL
112601: );
112602:
112603: IF (C_LEVEL_ERROR>= g_log_level) THEN
112626: ----------------------------------------------------------------------------------
112627: -- 4219869 Business Flow
112628: -- Update journal entry status -- Need to generate this within IF
112629: ----------------------------------------------------------------------------------
112630: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
112631: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
112632: ,p_balance_type_code => l_balance_type_code
112633: );
112634:
112713:
112714: --
112715: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
112716: --
112717: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
112718: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
112719: ELSE
112720: ---------------------------------------------------------------------------------------------------
112721: -- 4262811a Switch Sign
112738:
112739: XLA_AE_LINES_PKG.ValidateCurrentLine;
112740: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
112741:
112742: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
112743: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
112744: ,p_balance_type_code => l_balance_type_code);
112745:
112746: END IF;
112914: l_tmp_amt NUMBER;
112915: l_acc_rev_natural_side_code VARCHAR2(1);
112916:
112917: l_num_entries NUMBER;
112918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112922: l_recog_line_1 NUMBER;
112915: l_acc_rev_natural_side_code VARCHAR2(1);
112916:
112917: l_num_entries NUMBER;
112918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112922: l_recog_line_1 NUMBER;
112923: l_recog_line_2 NUMBER;
112916:
112917: l_num_entries NUMBER;
112918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112922: l_recog_line_1 NUMBER;
112923: l_recog_line_2 NUMBER;
112924:
112917: l_num_entries NUMBER;
112918: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
112919: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
112920: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
112921: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
112922: l_recog_line_1 NUMBER;
112923: l_recog_line_2 NUMBER;
112924:
112925: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
112923: l_recog_line_2 NUMBER;
112924:
112925: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
112926: l_bflow_applied_to_amt NUMBER; -- 5132302
112927: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
112928:
112929: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
112930:
112931: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
112998: l_accrual_line_num := NULL; -- 4262811
112999: l_tmp_amt := NULL; -- 4262811
113000: --
113001:
113002: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
113003: l_balance_type_code <> 'B' THEN
113004: IF NVL(p_source_33,'
113005: ') = 'REC_TAX' AND
113006: NVL(p_source_125,'
113074: --
113075: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
113076:
113077: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
113078: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
113079:
113080: -- 4955764
113081: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
113082: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
113198: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
113199:
113200: IF xla_accounting_cache_pkg.GetValueChar
113201: (p_source_code => 'LEDGER_CATEGORY_CODE'
113202: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
113203: AND l_bflow_method_code = 'PRIOR_ENTRY'
113204: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
113205: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
113206: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
113308: p_lookup_type => 'XLA_OWNER_TYPE'
113309: ,p_lookup_code => l_component_type_code
113310: )
113311: ,p_token_4 => 'PRODUCT_NAME'
113312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
113313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
113314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
113315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
113316: ,p_ae_header_id => NULL
113309: ,p_lookup_code => l_component_type_code
113310: )
113311: ,p_token_4 => 'PRODUCT_NAME'
113312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
113313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
113314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
113315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
113316: ,p_ae_header_id => NULL
113317: );
113310: )
113311: ,p_token_4 => 'PRODUCT_NAME'
113312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
113313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
113314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
113315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
113316: ,p_ae_header_id => NULL
113317: );
113318:
113311: ,p_token_4 => 'PRODUCT_NAME'
113312: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
113313: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
113314: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
113315: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
113316: ,p_ae_header_id => NULL
113317: );
113318:
113319: IF (C_LEVEL_ERROR>= g_log_level) THEN
113342: ----------------------------------------------------------------------------------
113343: -- 4219869 Business Flow
113344: -- Update journal entry status -- Need to generate this within IF
113345: ----------------------------------------------------------------------------------
113346: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
113347: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
113348: ,p_balance_type_code => l_balance_type_code
113349: );
113350:
113429:
113430: --
113431: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
113432: --
113433: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
113434: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
113435: ELSE
113436: ---------------------------------------------------------------------------------------------------
113437: -- 4262811a Switch Sign
113454:
113455: XLA_AE_LINES_PKG.ValidateCurrentLine;
113456: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
113457:
113458: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
113459: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
113460: ,p_balance_type_code => l_balance_type_code);
113461:
113462: END IF;
113634: l_tmp_amt NUMBER;
113635: l_acc_rev_natural_side_code VARCHAR2(1);
113636:
113637: l_num_entries NUMBER;
113638: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
113639: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
113640: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
113641: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
113642: l_recog_line_1 NUMBER;
113635: l_acc_rev_natural_side_code VARCHAR2(1);
113636:
113637: l_num_entries NUMBER;
113638: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
113639: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
113640: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
113641: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
113642: l_recog_line_1 NUMBER;
113643: l_recog_line_2 NUMBER;
113636:
113637: l_num_entries NUMBER;
113638: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
113639: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
113640: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
113641: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
113642: l_recog_line_1 NUMBER;
113643: l_recog_line_2 NUMBER;
113644:
113637: l_num_entries NUMBER;
113638: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
113639: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
113640: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
113641: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
113642: l_recog_line_1 NUMBER;
113643: l_recog_line_2 NUMBER;
113644:
113645: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
113643: l_recog_line_2 NUMBER;
113644:
113645: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
113646: l_bflow_applied_to_amt NUMBER; -- 5132302
113647: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
113648:
113649: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
113650:
113651: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
113718: l_accrual_line_num := NULL; -- 4262811
113719: l_tmp_amt := NULL; -- 4262811
113720: --
113721:
113722: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
113723: l_balance_type_code <> 'B' THEN
113724: IF NVL(p_source_164,'
113725: ') = 'STANDARD' AND
113726: NVL(p_source_33,'
113792: --
113793: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
113794:
113795: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
113796: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
113797:
113798: -- 4955764
113799: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
113800: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
113918: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
113919:
113920: IF xla_accounting_cache_pkg.GetValueChar
113921: (p_source_code => 'LEDGER_CATEGORY_CODE'
113922: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
113923: AND l_bflow_method_code = 'PRIOR_ENTRY'
113924: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
113925: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
113926: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
114115: p_lookup_type => 'XLA_OWNER_TYPE'
114116: ,p_lookup_code => l_component_type_code
114117: )
114118: ,p_token_4 => 'PRODUCT_NAME'
114119: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
114120: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
114121: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
114122: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
114123: ,p_ae_header_id => NULL
114116: ,p_lookup_code => l_component_type_code
114117: )
114118: ,p_token_4 => 'PRODUCT_NAME'
114119: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
114120: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
114121: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
114122: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
114123: ,p_ae_header_id => NULL
114124: );
114117: )
114118: ,p_token_4 => 'PRODUCT_NAME'
114119: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
114120: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
114121: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
114122: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
114123: ,p_ae_header_id => NULL
114124: );
114125:
114118: ,p_token_4 => 'PRODUCT_NAME'
114119: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
114120: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
114121: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
114122: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
114123: ,p_ae_header_id => NULL
114124: );
114125:
114126: IF (C_LEVEL_ERROR>= g_log_level) THEN
114149: ----------------------------------------------------------------------------------
114150: -- 4219869 Business Flow
114151: -- Update journal entry status -- Need to generate this within IF
114152: ----------------------------------------------------------------------------------
114153: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
114154: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
114155: ,p_balance_type_code => l_balance_type_code
114156: );
114157:
114323:
114324: --
114325: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
114326: --
114327: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
114328: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
114329: ELSE
114330: ---------------------------------------------------------------------------------------------------
114331: -- 4262811a Switch Sign
114348:
114349: XLA_AE_LINES_PKG.ValidateCurrentLine;
114350: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
114351:
114352: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
114353: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
114354: ,p_balance_type_code => l_balance_type_code);
114355:
114356: END IF;
114528: l_tmp_amt NUMBER;
114529: l_acc_rev_natural_side_code VARCHAR2(1);
114530:
114531: l_num_entries NUMBER;
114532: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
114533: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
114534: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
114535: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
114536: l_recog_line_1 NUMBER;
114529: l_acc_rev_natural_side_code VARCHAR2(1);
114530:
114531: l_num_entries NUMBER;
114532: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
114533: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
114534: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
114535: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
114536: l_recog_line_1 NUMBER;
114537: l_recog_line_2 NUMBER;
114530:
114531: l_num_entries NUMBER;
114532: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
114533: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
114534: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
114535: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
114536: l_recog_line_1 NUMBER;
114537: l_recog_line_2 NUMBER;
114538:
114531: l_num_entries NUMBER;
114532: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
114533: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
114534: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
114535: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
114536: l_recog_line_1 NUMBER;
114537: l_recog_line_2 NUMBER;
114538:
114539: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
114537: l_recog_line_2 NUMBER;
114538:
114539: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
114540: l_bflow_applied_to_amt NUMBER; -- 5132302
114541: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
114542:
114543: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
114544:
114545: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
114612: l_accrual_line_num := NULL; -- 4262811
114613: l_tmp_amt := NULL; -- 4262811
114614: --
114615:
114616: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
114617: l_balance_type_code <> 'B' THEN
114618: IF NVL(p_source_33,'
114619: ') = 'RETAINAGE' AND
114620: NVL(p_source_164,'
114686: --
114687: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
114688:
114689: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
114690: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
114691:
114692: -- 4955764
114693: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
114694: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
114810: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
114811:
114812: IF xla_accounting_cache_pkg.GetValueChar
114813: (p_source_code => 'LEDGER_CATEGORY_CODE'
114814: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
114815: AND l_bflow_method_code = 'PRIOR_ENTRY'
114816: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
114817: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
114818: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
115007: p_lookup_type => 'XLA_OWNER_TYPE'
115008: ,p_lookup_code => l_component_type_code
115009: )
115010: ,p_token_4 => 'PRODUCT_NAME'
115011: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115012: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115013: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115014: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115015: ,p_ae_header_id => NULL
115008: ,p_lookup_code => l_component_type_code
115009: )
115010: ,p_token_4 => 'PRODUCT_NAME'
115011: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115012: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115013: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115014: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115015: ,p_ae_header_id => NULL
115016: );
115009: )
115010: ,p_token_4 => 'PRODUCT_NAME'
115011: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115012: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115013: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115014: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115015: ,p_ae_header_id => NULL
115016: );
115017:
115010: ,p_token_4 => 'PRODUCT_NAME'
115011: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115012: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115013: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115014: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115015: ,p_ae_header_id => NULL
115016: );
115017:
115018: IF (C_LEVEL_ERROR>= g_log_level) THEN
115041: ----------------------------------------------------------------------------------
115042: -- 4219869 Business Flow
115043: -- Update journal entry status -- Need to generate this within IF
115044: ----------------------------------------------------------------------------------
115045: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
115046: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
115047: ,p_balance_type_code => l_balance_type_code
115048: );
115049:
115215:
115216: --
115217: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
115218: --
115219: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
115220: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
115221: ELSE
115222: ---------------------------------------------------------------------------------------------------
115223: -- 4262811a Switch Sign
115240:
115241: XLA_AE_LINES_PKG.ValidateCurrentLine;
115242: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
115243:
115244: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
115245: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
115246: ,p_balance_type_code => l_balance_type_code);
115247:
115248: END IF;
115415: l_tmp_amt NUMBER;
115416: l_acc_rev_natural_side_code VARCHAR2(1);
115417:
115418: l_num_entries NUMBER;
115419: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
115420: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
115421: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
115422: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
115423: l_recog_line_1 NUMBER;
115416: l_acc_rev_natural_side_code VARCHAR2(1);
115417:
115418: l_num_entries NUMBER;
115419: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
115420: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
115421: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
115422: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
115423: l_recog_line_1 NUMBER;
115424: l_recog_line_2 NUMBER;
115417:
115418: l_num_entries NUMBER;
115419: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
115420: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
115421: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
115422: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
115423: l_recog_line_1 NUMBER;
115424: l_recog_line_2 NUMBER;
115425:
115418: l_num_entries NUMBER;
115419: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
115420: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
115421: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
115422: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
115423: l_recog_line_1 NUMBER;
115424: l_recog_line_2 NUMBER;
115425:
115426: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
115424: l_recog_line_2 NUMBER;
115425:
115426: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
115427: l_bflow_applied_to_amt NUMBER; -- 5132302
115428: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
115429:
115430: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
115431:
115432: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
115499: l_accrual_line_num := NULL; -- 4262811
115500: l_tmp_amt := NULL; -- 4262811
115501: --
115502:
115503: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
115504: l_balance_type_code <> 'B' THEN
115505: IF NVL(p_source_33,'
115506: ') = 'RETAINAGE'
115507: THEN
115571: --
115572: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
115573:
115574: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
115575: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
115576:
115577: -- 4955764
115578: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
115579: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
115693: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
115694:
115695: IF xla_accounting_cache_pkg.GetValueChar
115696: (p_source_code => 'LEDGER_CATEGORY_CODE'
115697: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
115698: AND l_bflow_method_code = 'PRIOR_ENTRY'
115699: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
115700: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
115701: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
115890: p_lookup_type => 'XLA_OWNER_TYPE'
115891: ,p_lookup_code => l_component_type_code
115892: )
115893: ,p_token_4 => 'PRODUCT_NAME'
115894: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115895: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115896: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115897: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115898: ,p_ae_header_id => NULL
115891: ,p_lookup_code => l_component_type_code
115892: )
115893: ,p_token_4 => 'PRODUCT_NAME'
115894: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115895: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115896: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115897: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115898: ,p_ae_header_id => NULL
115899: );
115892: )
115893: ,p_token_4 => 'PRODUCT_NAME'
115894: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115895: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115896: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115897: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115898: ,p_ae_header_id => NULL
115899: );
115900:
115893: ,p_token_4 => 'PRODUCT_NAME'
115894: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
115895: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
115896: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
115897: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
115898: ,p_ae_header_id => NULL
115899: );
115900:
115901: IF (C_LEVEL_ERROR>= g_log_level) THEN
115924: ----------------------------------------------------------------------------------
115925: -- 4219869 Business Flow
115926: -- Update journal entry status -- Need to generate this within IF
115927: ----------------------------------------------------------------------------------
115928: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
115929: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
115930: ,p_balance_type_code => l_balance_type_code
115931: );
115932:
116098:
116099: --
116100: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
116101: --
116102: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
116103: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
116104: ELSE
116105: ---------------------------------------------------------------------------------------------------
116106: -- 4262811a Switch Sign
116123:
116124: XLA_AE_LINES_PKG.ValidateCurrentLine;
116125: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
116126:
116127: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
116128: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
116129: ,p_balance_type_code => l_balance_type_code);
116130:
116131: END IF;
116284: l_tmp_amt NUMBER;
116285: l_acc_rev_natural_side_code VARCHAR2(1);
116286:
116287: l_num_entries NUMBER;
116288: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116289: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116290: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116291: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116292: l_recog_line_1 NUMBER;
116285: l_acc_rev_natural_side_code VARCHAR2(1);
116286:
116287: l_num_entries NUMBER;
116288: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116289: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116290: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116291: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116292: l_recog_line_1 NUMBER;
116293: l_recog_line_2 NUMBER;
116286:
116287: l_num_entries NUMBER;
116288: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116289: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116290: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116291: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116292: l_recog_line_1 NUMBER;
116293: l_recog_line_2 NUMBER;
116294:
116287: l_num_entries NUMBER;
116288: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116289: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116290: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116291: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116292: l_recog_line_1 NUMBER;
116293: l_recog_line_2 NUMBER;
116294:
116295: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
116293: l_recog_line_2 NUMBER;
116294:
116295: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
116296: l_bflow_applied_to_amt NUMBER; -- 5132302
116297: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
116298:
116299: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
116300:
116301: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
116368: l_accrual_line_num := NULL; -- 4262811
116369: l_tmp_amt := NULL; -- 4262811
116370: --
116371:
116372: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
116373: l_balance_type_code <> 'B' THEN
116374: IF NVL(p_source_164,'
116375: ') = 'RETAINAGE RELEASE' AND
116376: NVL(p_source_33,'
116442: --
116443: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
116444:
116445: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
116446: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
116447:
116448: -- 4955764
116449: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
116450: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
116558: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
116559:
116560: IF xla_accounting_cache_pkg.GetValueChar
116561: (p_source_code => 'LEDGER_CATEGORY_CODE'
116562: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
116563: AND l_bflow_method_code = 'PRIOR_ENTRY'
116564: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
116565: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
116566: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
116645: p_lookup_type => 'XLA_OWNER_TYPE'
116646: ,p_lookup_code => l_component_type_code
116647: )
116648: ,p_token_4 => 'PRODUCT_NAME'
116649: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
116650: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
116651: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
116652: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
116653: ,p_ae_header_id => NULL
116646: ,p_lookup_code => l_component_type_code
116647: )
116648: ,p_token_4 => 'PRODUCT_NAME'
116649: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
116650: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
116651: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
116652: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
116653: ,p_ae_header_id => NULL
116654: );
116647: )
116648: ,p_token_4 => 'PRODUCT_NAME'
116649: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
116650: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
116651: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
116652: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
116653: ,p_ae_header_id => NULL
116654: );
116655:
116648: ,p_token_4 => 'PRODUCT_NAME'
116649: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
116650: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
116651: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
116652: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
116653: ,p_ae_header_id => NULL
116654: );
116655:
116656: IF (C_LEVEL_ERROR>= g_log_level) THEN
116679: ----------------------------------------------------------------------------------
116680: -- 4219869 Business Flow
116681: -- Update journal entry status -- Need to generate this within IF
116682: ----------------------------------------------------------------------------------
116683: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
116684: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
116685: ,p_balance_type_code => l_balance_type_code
116686: );
116687:
116740:
116741: --
116742: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
116743: --
116744: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
116745: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
116746: ELSE
116747: ---------------------------------------------------------------------------------------------------
116748: -- 4262811a Switch Sign
116765:
116766: XLA_AE_LINES_PKG.ValidateCurrentLine;
116767: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
116768:
116769: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
116770: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
116771: ,p_balance_type_code => l_balance_type_code);
116772:
116773: END IF;
116941: l_tmp_amt NUMBER;
116942: l_acc_rev_natural_side_code VARCHAR2(1);
116943:
116944: l_num_entries NUMBER;
116945: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116946: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116947: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116948: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116949: l_recog_line_1 NUMBER;
116942: l_acc_rev_natural_side_code VARCHAR2(1);
116943:
116944: l_num_entries NUMBER;
116945: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116946: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116947: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116948: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116949: l_recog_line_1 NUMBER;
116950: l_recog_line_2 NUMBER;
116943:
116944: l_num_entries NUMBER;
116945: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116946: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116947: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116948: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116949: l_recog_line_1 NUMBER;
116950: l_recog_line_2 NUMBER;
116951:
116944: l_num_entries NUMBER;
116945: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
116946: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
116947: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
116948: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
116949: l_recog_line_1 NUMBER;
116950: l_recog_line_2 NUMBER;
116951:
116952: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
116950: l_recog_line_2 NUMBER;
116951:
116952: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
116953: l_bflow_applied_to_amt NUMBER; -- 5132302
116954: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
116955:
116956: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
116957:
116958: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
117025: l_accrual_line_num := NULL; -- 4262811
117026: l_tmp_amt := NULL; -- 4262811
117027: --
117028:
117029: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
117030: l_balance_type_code <> 'B' THEN
117031: IF (NVL(p_source_33,'
117032: ') = 'NONREC_TAX' OR
117033: NVL(p_source_33,'
117107: --
117108: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
117109:
117110: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
117111: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
117112:
117113: -- 4955764
117114: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
117115: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
117231: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
117232:
117233: IF xla_accounting_cache_pkg.GetValueChar
117234: (p_source_code => 'LEDGER_CATEGORY_CODE'
117235: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
117236: AND l_bflow_method_code = 'PRIOR_ENTRY'
117237: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
117238: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
117239: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
117341: p_lookup_type => 'XLA_OWNER_TYPE'
117342: ,p_lookup_code => l_component_type_code
117343: )
117344: ,p_token_4 => 'PRODUCT_NAME'
117345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
117346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
117347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
117348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
117349: ,p_ae_header_id => NULL
117342: ,p_lookup_code => l_component_type_code
117343: )
117344: ,p_token_4 => 'PRODUCT_NAME'
117345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
117346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
117347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
117348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
117349: ,p_ae_header_id => NULL
117350: );
117343: )
117344: ,p_token_4 => 'PRODUCT_NAME'
117345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
117346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
117347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
117348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
117349: ,p_ae_header_id => NULL
117350: );
117351:
117344: ,p_token_4 => 'PRODUCT_NAME'
117345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
117346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
117347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
117348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
117349: ,p_ae_header_id => NULL
117350: );
117351:
117352: IF (C_LEVEL_ERROR>= g_log_level) THEN
117375: ----------------------------------------------------------------------------------
117376: -- 4219869 Business Flow
117377: -- Update journal entry status -- Need to generate this within IF
117378: ----------------------------------------------------------------------------------
117379: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
117380: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
117381: ,p_balance_type_code => l_balance_type_code
117382: );
117383:
117462:
117463: --
117464: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
117465: --
117466: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
117467: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
117468: ELSE
117469: ---------------------------------------------------------------------------------------------------
117470: -- 4262811a Switch Sign
117487:
117488: XLA_AE_LINES_PKG.ValidateCurrentLine;
117489: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
117490:
117491: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
117492: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
117493: ,p_balance_type_code => l_balance_type_code);
117494:
117495: END IF;
117663: l_tmp_amt NUMBER;
117664: l_acc_rev_natural_side_code VARCHAR2(1);
117665:
117666: l_num_entries NUMBER;
117667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
117668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
117669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
117670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
117671: l_recog_line_1 NUMBER;
117664: l_acc_rev_natural_side_code VARCHAR2(1);
117665:
117666: l_num_entries NUMBER;
117667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
117668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
117669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
117670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
117671: l_recog_line_1 NUMBER;
117672: l_recog_line_2 NUMBER;
117665:
117666: l_num_entries NUMBER;
117667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
117668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
117669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
117670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
117671: l_recog_line_1 NUMBER;
117672: l_recog_line_2 NUMBER;
117673:
117666: l_num_entries NUMBER;
117667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
117668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
117669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
117670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
117671: l_recog_line_1 NUMBER;
117672: l_recog_line_2 NUMBER;
117673:
117674: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
117672: l_recog_line_2 NUMBER;
117673:
117674: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
117675: l_bflow_applied_to_amt NUMBER; -- 5132302
117676: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
117677:
117678: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
117679:
117680: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
117747: l_accrual_line_num := NULL; -- 4262811
117748: l_tmp_amt := NULL; -- 4262811
117749: --
117750:
117751: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
117752: l_balance_type_code <> 'B' THEN
117753: IF (NVL(p_source_33,'
117754: ') = 'NONREC_TAX' OR
117755: NVL(p_source_33,'
117829: --
117830: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
117831:
117832: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
117833: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
117834:
117835: -- 4955764
117836: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
117837: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
117953: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
117954:
117955: IF xla_accounting_cache_pkg.GetValueChar
117956: (p_source_code => 'LEDGER_CATEGORY_CODE'
117957: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
117958: AND l_bflow_method_code = 'PRIOR_ENTRY'
117959: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
117960: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
117961: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
118063: p_lookup_type => 'XLA_OWNER_TYPE'
118064: ,p_lookup_code => l_component_type_code
118065: )
118066: ,p_token_4 => 'PRODUCT_NAME'
118067: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118068: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118069: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118070: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118071: ,p_ae_header_id => NULL
118064: ,p_lookup_code => l_component_type_code
118065: )
118066: ,p_token_4 => 'PRODUCT_NAME'
118067: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118068: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118069: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118070: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118071: ,p_ae_header_id => NULL
118072: );
118065: )
118066: ,p_token_4 => 'PRODUCT_NAME'
118067: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118068: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118069: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118070: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118071: ,p_ae_header_id => NULL
118072: );
118073:
118066: ,p_token_4 => 'PRODUCT_NAME'
118067: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118068: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118069: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118070: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118071: ,p_ae_header_id => NULL
118072: );
118073:
118074: IF (C_LEVEL_ERROR>= g_log_level) THEN
118097: ----------------------------------------------------------------------------------
118098: -- 4219869 Business Flow
118099: -- Update journal entry status -- Need to generate this within IF
118100: ----------------------------------------------------------------------------------
118101: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
118102: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
118103: ,p_balance_type_code => l_balance_type_code
118104: );
118105:
118184:
118185: --
118186: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
118187: --
118188: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
118189: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
118190: ELSE
118191: ---------------------------------------------------------------------------------------------------
118192: -- 4262811a Switch Sign
118209:
118210: XLA_AE_LINES_PKG.ValidateCurrentLine;
118211: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
118212:
118213: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
118214: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
118215: ,p_balance_type_code => l_balance_type_code);
118216:
118217: END IF;
118383: l_tmp_amt NUMBER;
118384: l_acc_rev_natural_side_code VARCHAR2(1);
118385:
118386: l_num_entries NUMBER;
118387: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
118388: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
118389: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
118390: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
118391: l_recog_line_1 NUMBER;
118384: l_acc_rev_natural_side_code VARCHAR2(1);
118385:
118386: l_num_entries NUMBER;
118387: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
118388: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
118389: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
118390: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
118391: l_recog_line_1 NUMBER;
118392: l_recog_line_2 NUMBER;
118385:
118386: l_num_entries NUMBER;
118387: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
118388: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
118389: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
118390: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
118391: l_recog_line_1 NUMBER;
118392: l_recog_line_2 NUMBER;
118393:
118386: l_num_entries NUMBER;
118387: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
118388: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
118389: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
118390: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
118391: l_recog_line_1 NUMBER;
118392: l_recog_line_2 NUMBER;
118393:
118394: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
118392: l_recog_line_2 NUMBER;
118393:
118394: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
118395: l_bflow_applied_to_amt NUMBER; -- 5132302
118396: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
118397:
118398: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
118399:
118400: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
118467: l_accrual_line_num := NULL; -- 4262811
118468: l_tmp_amt := NULL; -- 4262811
118469: --
118470:
118471: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
118472: l_balance_type_code <> 'B' THEN
118473: IF (NVL(p_source_33,'
118474: ') = 'NONREC_TAX' OR
118475: NVL(p_source_33,'
118549: --
118550: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
118551:
118552: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
118553: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
118554:
118555: -- 4955764
118556: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
118557: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
118671: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
118672:
118673: IF xla_accounting_cache_pkg.GetValueChar
118674: (p_source_code => 'LEDGER_CATEGORY_CODE'
118675: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
118676: AND l_bflow_method_code = 'PRIOR_ENTRY'
118677: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
118678: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
118679: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
118781: p_lookup_type => 'XLA_OWNER_TYPE'
118782: ,p_lookup_code => l_component_type_code
118783: )
118784: ,p_token_4 => 'PRODUCT_NAME'
118785: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118786: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118787: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118788: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118789: ,p_ae_header_id => NULL
118782: ,p_lookup_code => l_component_type_code
118783: )
118784: ,p_token_4 => 'PRODUCT_NAME'
118785: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118786: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118787: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118788: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118789: ,p_ae_header_id => NULL
118790: );
118783: )
118784: ,p_token_4 => 'PRODUCT_NAME'
118785: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118786: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118787: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118788: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118789: ,p_ae_header_id => NULL
118790: );
118791:
118784: ,p_token_4 => 'PRODUCT_NAME'
118785: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
118786: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
118787: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
118788: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
118789: ,p_ae_header_id => NULL
118790: );
118791:
118792: IF (C_LEVEL_ERROR>= g_log_level) THEN
118815: ----------------------------------------------------------------------------------
118816: -- 4219869 Business Flow
118817: -- Update journal entry status -- Need to generate this within IF
118818: ----------------------------------------------------------------------------------
118819: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
118820: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
118821: ,p_balance_type_code => l_balance_type_code
118822: );
118823:
118902:
118903: --
118904: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
118905: --
118906: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
118907: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
118908: ELSE
118909: ---------------------------------------------------------------------------------------------------
118910: -- 4262811a Switch Sign
118927:
118928: XLA_AE_LINES_PKG.ValidateCurrentLine;
118929: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
118930:
118931: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
118932: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
118933: ,p_balance_type_code => l_balance_type_code);
118934:
118935: END IF;
119103: l_tmp_amt NUMBER;
119104: l_acc_rev_natural_side_code VARCHAR2(1);
119105:
119106: l_num_entries NUMBER;
119107: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119108: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119109: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119110: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119111: l_recog_line_1 NUMBER;
119104: l_acc_rev_natural_side_code VARCHAR2(1);
119105:
119106: l_num_entries NUMBER;
119107: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119108: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119109: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119110: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119111: l_recog_line_1 NUMBER;
119112: l_recog_line_2 NUMBER;
119105:
119106: l_num_entries NUMBER;
119107: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119108: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119109: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119110: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119111: l_recog_line_1 NUMBER;
119112: l_recog_line_2 NUMBER;
119113:
119106: l_num_entries NUMBER;
119107: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119108: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119109: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119110: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119111: l_recog_line_1 NUMBER;
119112: l_recog_line_2 NUMBER;
119113:
119114: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
119112: l_recog_line_2 NUMBER;
119113:
119114: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
119115: l_bflow_applied_to_amt NUMBER; -- 5132302
119116: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
119117:
119118: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
119119:
119120: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
119187: l_accrual_line_num := NULL; -- 4262811
119188: l_tmp_amt := NULL; -- 4262811
119189: --
119190:
119191: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
119192: l_balance_type_code <> 'B' THEN
119193: IF (NVL(p_source_33,'
119194: ') = 'NONREC_TAX' OR
119195: NVL(p_source_33,'
119269: --
119270: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
119271:
119272: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
119273: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
119274:
119275: -- 4955764
119276: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
119277: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
119395: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
119396:
119397: IF xla_accounting_cache_pkg.GetValueChar
119398: (p_source_code => 'LEDGER_CATEGORY_CODE'
119399: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
119400: AND l_bflow_method_code = 'PRIOR_ENTRY'
119401: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
119402: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
119403: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
119505: p_lookup_type => 'XLA_OWNER_TYPE'
119506: ,p_lookup_code => l_component_type_code
119507: )
119508: ,p_token_4 => 'PRODUCT_NAME'
119509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
119510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
119511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
119512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
119513: ,p_ae_header_id => NULL
119506: ,p_lookup_code => l_component_type_code
119507: )
119508: ,p_token_4 => 'PRODUCT_NAME'
119509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
119510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
119511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
119512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
119513: ,p_ae_header_id => NULL
119514: );
119507: )
119508: ,p_token_4 => 'PRODUCT_NAME'
119509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
119510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
119511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
119512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
119513: ,p_ae_header_id => NULL
119514: );
119515:
119508: ,p_token_4 => 'PRODUCT_NAME'
119509: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
119510: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
119511: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
119512: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
119513: ,p_ae_header_id => NULL
119514: );
119515:
119516: IF (C_LEVEL_ERROR>= g_log_level) THEN
119539: ----------------------------------------------------------------------------------
119540: -- 4219869 Business Flow
119541: -- Update journal entry status -- Need to generate this within IF
119542: ----------------------------------------------------------------------------------
119543: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
119544: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
119545: ,p_balance_type_code => l_balance_type_code
119546: );
119547:
119626:
119627: --
119628: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
119629: --
119630: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
119631: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
119632: ELSE
119633: ---------------------------------------------------------------------------------------------------
119634: -- 4262811a Switch Sign
119651:
119652: XLA_AE_LINES_PKG.ValidateCurrentLine;
119653: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
119654:
119655: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
119656: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
119657: ,p_balance_type_code => l_balance_type_code);
119658:
119659: END IF;
119824: l_tmp_amt NUMBER;
119825: l_acc_rev_natural_side_code VARCHAR2(1);
119826:
119827: l_num_entries NUMBER;
119828: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119829: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119830: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119831: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119832: l_recog_line_1 NUMBER;
119825: l_acc_rev_natural_side_code VARCHAR2(1);
119826:
119827: l_num_entries NUMBER;
119828: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119829: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119830: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119831: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119832: l_recog_line_1 NUMBER;
119833: l_recog_line_2 NUMBER;
119826:
119827: l_num_entries NUMBER;
119828: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119829: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119830: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119831: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119832: l_recog_line_1 NUMBER;
119833: l_recog_line_2 NUMBER;
119834:
119827: l_num_entries NUMBER;
119828: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
119829: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
119830: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
119831: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
119832: l_recog_line_1 NUMBER;
119833: l_recog_line_2 NUMBER;
119834:
119835: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
119833: l_recog_line_2 NUMBER;
119834:
119835: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
119836: l_bflow_applied_to_amt NUMBER; -- 5132302
119837: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
119838:
119839: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
119840:
119841: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
119908: l_accrual_line_num := NULL; -- 4262811
119909: l_tmp_amt := NULL; -- 4262811
119910: --
119911:
119912: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
119913: l_balance_type_code <> 'B' THEN
119914: IF NVL(p_source_33,'
119915: ') = 'REC_TAX' AND
119916: NVL(p_source_135,'
119982: --
119983: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
119984:
119985: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
119986: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
119987:
119988: -- 4955764
119989: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
119990: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
120106: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
120107:
120108: IF xla_accounting_cache_pkg.GetValueChar
120109: (p_source_code => 'LEDGER_CATEGORY_CODE'
120110: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
120111: AND l_bflow_method_code = 'PRIOR_ENTRY'
120112: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
120113: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
120114: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
120216: p_lookup_type => 'XLA_OWNER_TYPE'
120217: ,p_lookup_code => l_component_type_code
120218: )
120219: ,p_token_4 => 'PRODUCT_NAME'
120220: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120221: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120222: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120223: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120224: ,p_ae_header_id => NULL
120217: ,p_lookup_code => l_component_type_code
120218: )
120219: ,p_token_4 => 'PRODUCT_NAME'
120220: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120221: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120222: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120223: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120224: ,p_ae_header_id => NULL
120225: );
120218: )
120219: ,p_token_4 => 'PRODUCT_NAME'
120220: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120221: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120222: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120223: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120224: ,p_ae_header_id => NULL
120225: );
120226:
120219: ,p_token_4 => 'PRODUCT_NAME'
120220: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120221: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120222: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120223: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120224: ,p_ae_header_id => NULL
120225: );
120226:
120227: IF (C_LEVEL_ERROR>= g_log_level) THEN
120250: ----------------------------------------------------------------------------------
120251: -- 4219869 Business Flow
120252: -- Update journal entry status -- Need to generate this within IF
120253: ----------------------------------------------------------------------------------
120254: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
120255: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
120256: ,p_balance_type_code => l_balance_type_code
120257: );
120258:
120337:
120338: --
120339: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
120340: --
120341: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
120342: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
120343: ELSE
120344: ---------------------------------------------------------------------------------------------------
120345: -- 4262811a Switch Sign
120362:
120363: XLA_AE_LINES_PKG.ValidateCurrentLine;
120364: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
120365:
120366: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
120367: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
120368: ,p_balance_type_code => l_balance_type_code);
120369:
120370: END IF;
120535: l_tmp_amt NUMBER;
120536: l_acc_rev_natural_side_code VARCHAR2(1);
120537:
120538: l_num_entries NUMBER;
120539: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
120540: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
120541: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
120542: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
120543: l_recog_line_1 NUMBER;
120536: l_acc_rev_natural_side_code VARCHAR2(1);
120537:
120538: l_num_entries NUMBER;
120539: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
120540: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
120541: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
120542: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
120543: l_recog_line_1 NUMBER;
120544: l_recog_line_2 NUMBER;
120537:
120538: l_num_entries NUMBER;
120539: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
120540: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
120541: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
120542: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
120543: l_recog_line_1 NUMBER;
120544: l_recog_line_2 NUMBER;
120545:
120538: l_num_entries NUMBER;
120539: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
120540: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
120541: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
120542: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
120543: l_recog_line_1 NUMBER;
120544: l_recog_line_2 NUMBER;
120545:
120546: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
120544: l_recog_line_2 NUMBER;
120545:
120546: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
120547: l_bflow_applied_to_amt NUMBER; -- 5132302
120548: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
120549:
120550: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
120551:
120552: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
120619: l_accrual_line_num := NULL; -- 4262811
120620: l_tmp_amt := NULL; -- 4262811
120621: --
120622:
120623: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
120624: l_balance_type_code <> 'B' THEN
120625: IF NVL(p_source_33,'
120626: ') = 'REC_TAX' AND
120627: NVL(p_source_135,'
120693: --
120694: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
120695:
120696: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
120697: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
120698:
120699: -- 4955764
120700: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
120701: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
120817: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
120818:
120819: IF xla_accounting_cache_pkg.GetValueChar
120820: (p_source_code => 'LEDGER_CATEGORY_CODE'
120821: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
120822: AND l_bflow_method_code = 'PRIOR_ENTRY'
120823: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
120824: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
120825: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
120927: p_lookup_type => 'XLA_OWNER_TYPE'
120928: ,p_lookup_code => l_component_type_code
120929: )
120930: ,p_token_4 => 'PRODUCT_NAME'
120931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120935: ,p_ae_header_id => NULL
120928: ,p_lookup_code => l_component_type_code
120929: )
120930: ,p_token_4 => 'PRODUCT_NAME'
120931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120935: ,p_ae_header_id => NULL
120936: );
120929: )
120930: ,p_token_4 => 'PRODUCT_NAME'
120931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120935: ,p_ae_header_id => NULL
120936: );
120937:
120930: ,p_token_4 => 'PRODUCT_NAME'
120931: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
120932: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
120933: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
120934: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
120935: ,p_ae_header_id => NULL
120936: );
120937:
120938: IF (C_LEVEL_ERROR>= g_log_level) THEN
120961: ----------------------------------------------------------------------------------
120962: -- 4219869 Business Flow
120963: -- Update journal entry status -- Need to generate this within IF
120964: ----------------------------------------------------------------------------------
120965: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
120966: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
120967: ,p_balance_type_code => l_balance_type_code
120968: );
120969:
121048:
121049: --
121050: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
121051: --
121052: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
121053: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
121054: ELSE
121055: ---------------------------------------------------------------------------------------------------
121056: -- 4262811a Switch Sign
121073:
121074: XLA_AE_LINES_PKG.ValidateCurrentLine;
121075: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
121076:
121077: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
121078: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
121079: ,p_balance_type_code => l_balance_type_code);
121080:
121081: END IF;
121244: l_tmp_amt NUMBER;
121245: l_acc_rev_natural_side_code VARCHAR2(1);
121246:
121247: l_num_entries NUMBER;
121248: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121249: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121250: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121251: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121252: l_recog_line_1 NUMBER;
121245: l_acc_rev_natural_side_code VARCHAR2(1);
121246:
121247: l_num_entries NUMBER;
121248: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121249: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121250: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121251: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121252: l_recog_line_1 NUMBER;
121253: l_recog_line_2 NUMBER;
121246:
121247: l_num_entries NUMBER;
121248: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121249: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121250: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121251: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121252: l_recog_line_1 NUMBER;
121253: l_recog_line_2 NUMBER;
121254:
121247: l_num_entries NUMBER;
121248: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121249: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121250: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121251: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121252: l_recog_line_1 NUMBER;
121253: l_recog_line_2 NUMBER;
121254:
121255: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
121253: l_recog_line_2 NUMBER;
121254:
121255: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
121256: l_bflow_applied_to_amt NUMBER; -- 5132302
121257: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
121258:
121259: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
121260:
121261: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
121328: l_accrual_line_num := NULL; -- 4262811
121329: l_tmp_amt := NULL; -- 4262811
121330: --
121331:
121332: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
121333: l_balance_type_code <> 'B' THEN
121334: IF NVL(p_source_33,'
121335: ') = 'REC_TAX' AND
121336: NVL(p_source_135,'
121402: --
121403: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
121404:
121405: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
121406: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
121407:
121408: -- 4955764
121409: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
121410: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
121524: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
121525:
121526: IF xla_accounting_cache_pkg.GetValueChar
121527: (p_source_code => 'LEDGER_CATEGORY_CODE'
121528: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
121529: AND l_bflow_method_code = 'PRIOR_ENTRY'
121530: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
121531: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
121532: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
121634: p_lookup_type => 'XLA_OWNER_TYPE'
121635: ,p_lookup_code => l_component_type_code
121636: )
121637: ,p_token_4 => 'PRODUCT_NAME'
121638: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
121639: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
121640: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
121641: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
121642: ,p_ae_header_id => NULL
121635: ,p_lookup_code => l_component_type_code
121636: )
121637: ,p_token_4 => 'PRODUCT_NAME'
121638: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
121639: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
121640: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
121641: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
121642: ,p_ae_header_id => NULL
121643: );
121636: )
121637: ,p_token_4 => 'PRODUCT_NAME'
121638: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
121639: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
121640: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
121641: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
121642: ,p_ae_header_id => NULL
121643: );
121644:
121637: ,p_token_4 => 'PRODUCT_NAME'
121638: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
121639: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
121640: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
121641: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
121642: ,p_ae_header_id => NULL
121643: );
121644:
121645: IF (C_LEVEL_ERROR>= g_log_level) THEN
121668: ----------------------------------------------------------------------------------
121669: -- 4219869 Business Flow
121670: -- Update journal entry status -- Need to generate this within IF
121671: ----------------------------------------------------------------------------------
121672: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
121673: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
121674: ,p_balance_type_code => l_balance_type_code
121675: );
121676:
121755:
121756: --
121757: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
121758: --
121759: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
121760: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
121761: ELSE
121762: ---------------------------------------------------------------------------------------------------
121763: -- 4262811a Switch Sign
121780:
121781: XLA_AE_LINES_PKG.ValidateCurrentLine;
121782: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
121783:
121784: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
121785: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
121786: ,p_balance_type_code => l_balance_type_code);
121787:
121788: END IF;
121953: l_tmp_amt NUMBER;
121954: l_acc_rev_natural_side_code VARCHAR2(1);
121955:
121956: l_num_entries NUMBER;
121957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121961: l_recog_line_1 NUMBER;
121954: l_acc_rev_natural_side_code VARCHAR2(1);
121955:
121956: l_num_entries NUMBER;
121957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121961: l_recog_line_1 NUMBER;
121962: l_recog_line_2 NUMBER;
121955:
121956: l_num_entries NUMBER;
121957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121961: l_recog_line_1 NUMBER;
121962: l_recog_line_2 NUMBER;
121963:
121956: l_num_entries NUMBER;
121957: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
121958: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
121959: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
121960: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
121961: l_recog_line_1 NUMBER;
121962: l_recog_line_2 NUMBER;
121963:
121964: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
121962: l_recog_line_2 NUMBER;
121963:
121964: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
121965: l_bflow_applied_to_amt NUMBER; -- 5132302
121966: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
121967:
121968: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
121969:
121970: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
122037: l_accrual_line_num := NULL; -- 4262811
122038: l_tmp_amt := NULL; -- 4262811
122039: --
122040:
122041: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
122042: l_balance_type_code <> 'B' THEN
122043: IF NVL(p_source_33,'
122044: ') = 'REC_TAX' AND
122045: NVL(p_source_135,'
122111: --
122112: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
122113:
122114: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
122115: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
122116:
122117: -- 4955764
122118: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
122119: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
122237: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
122238:
122239: IF xla_accounting_cache_pkg.GetValueChar
122240: (p_source_code => 'LEDGER_CATEGORY_CODE'
122241: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
122242: AND l_bflow_method_code = 'PRIOR_ENTRY'
122243: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
122244: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
122245: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
122347: p_lookup_type => 'XLA_OWNER_TYPE'
122348: ,p_lookup_code => l_component_type_code
122349: )
122350: ,p_token_4 => 'PRODUCT_NAME'
122351: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
122352: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
122353: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
122354: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
122355: ,p_ae_header_id => NULL
122348: ,p_lookup_code => l_component_type_code
122349: )
122350: ,p_token_4 => 'PRODUCT_NAME'
122351: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
122352: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
122353: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
122354: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
122355: ,p_ae_header_id => NULL
122356: );
122349: )
122350: ,p_token_4 => 'PRODUCT_NAME'
122351: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
122352: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
122353: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
122354: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
122355: ,p_ae_header_id => NULL
122356: );
122357:
122350: ,p_token_4 => 'PRODUCT_NAME'
122351: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
122352: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
122353: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
122354: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
122355: ,p_ae_header_id => NULL
122356: );
122357:
122358: IF (C_LEVEL_ERROR>= g_log_level) THEN
122381: ----------------------------------------------------------------------------------
122382: -- 4219869 Business Flow
122383: -- Update journal entry status -- Need to generate this within IF
122384: ----------------------------------------------------------------------------------
122385: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
122386: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
122387: ,p_balance_type_code => l_balance_type_code
122388: );
122389:
122468:
122469: --
122470: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
122471: --
122472: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
122473: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
122474: ELSE
122475: ---------------------------------------------------------------------------------------------------
122476: -- 4262811a Switch Sign
122493:
122494: XLA_AE_LINES_PKG.ValidateCurrentLine;
122495: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
122496:
122497: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
122498: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
122499: ,p_balance_type_code => l_balance_type_code);
122500:
122501: END IF;
122666: l_tmp_amt NUMBER;
122667: l_acc_rev_natural_side_code VARCHAR2(1);
122668:
122669: l_num_entries NUMBER;
122670: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
122671: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
122672: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
122673: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
122674: l_recog_line_1 NUMBER;
122667: l_acc_rev_natural_side_code VARCHAR2(1);
122668:
122669: l_num_entries NUMBER;
122670: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
122671: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
122672: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
122673: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
122674: l_recog_line_1 NUMBER;
122675: l_recog_line_2 NUMBER;
122668:
122669: l_num_entries NUMBER;
122670: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
122671: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
122672: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
122673: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
122674: l_recog_line_1 NUMBER;
122675: l_recog_line_2 NUMBER;
122676:
122669: l_num_entries NUMBER;
122670: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
122671: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
122672: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
122673: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
122674: l_recog_line_1 NUMBER;
122675: l_recog_line_2 NUMBER;
122676:
122677: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
122675: l_recog_line_2 NUMBER;
122676:
122677: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
122678: l_bflow_applied_to_amt NUMBER; -- 5132302
122679: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
122680:
122681: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
122682:
122683: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
122750: l_accrual_line_num := NULL; -- 4262811
122751: l_tmp_amt := NULL; -- 4262811
122752: --
122753:
122754: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
122755: l_balance_type_code <> 'B' THEN
122756: IF (NVL(p_source_33,'
122757: ') = 'REC_TAX' OR
122758: NVL(p_source_33,'
122826: --
122827: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
122828:
122829: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
122830: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
122831:
122832: -- 4955764
122833: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
122834: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
122950: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
122951:
122952: IF xla_accounting_cache_pkg.GetValueChar
122953: (p_source_code => 'LEDGER_CATEGORY_CODE'
122954: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
122955: AND l_bflow_method_code = 'PRIOR_ENTRY'
122956: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
122957: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
122958: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
123060: p_lookup_type => 'XLA_OWNER_TYPE'
123061: ,p_lookup_code => l_component_type_code
123062: )
123063: ,p_token_4 => 'PRODUCT_NAME'
123064: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123065: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123066: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123067: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123068: ,p_ae_header_id => NULL
123061: ,p_lookup_code => l_component_type_code
123062: )
123063: ,p_token_4 => 'PRODUCT_NAME'
123064: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123065: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123066: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123067: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123068: ,p_ae_header_id => NULL
123069: );
123062: )
123063: ,p_token_4 => 'PRODUCT_NAME'
123064: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123065: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123066: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123067: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123068: ,p_ae_header_id => NULL
123069: );
123070:
123063: ,p_token_4 => 'PRODUCT_NAME'
123064: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123065: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123066: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123067: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123068: ,p_ae_header_id => NULL
123069: );
123070:
123071: IF (C_LEVEL_ERROR>= g_log_level) THEN
123094: ----------------------------------------------------------------------------------
123095: -- 4219869 Business Flow
123096: -- Update journal entry status -- Need to generate this within IF
123097: ----------------------------------------------------------------------------------
123098: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
123099: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
123100: ,p_balance_type_code => l_balance_type_code
123101: );
123102:
123181:
123182: --
123183: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
123184: --
123185: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
123186: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
123187: ELSE
123188: ---------------------------------------------------------------------------------------------------
123189: -- 4262811a Switch Sign
123206:
123207: XLA_AE_LINES_PKG.ValidateCurrentLine;
123208: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
123209:
123210: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
123211: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
123212: ,p_balance_type_code => l_balance_type_code);
123213:
123214: END IF;
123377: l_tmp_amt NUMBER;
123378: l_acc_rev_natural_side_code VARCHAR2(1);
123379:
123380: l_num_entries NUMBER;
123381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
123382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
123383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
123384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
123385: l_recog_line_1 NUMBER;
123378: l_acc_rev_natural_side_code VARCHAR2(1);
123379:
123380: l_num_entries NUMBER;
123381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
123382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
123383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
123384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
123385: l_recog_line_1 NUMBER;
123386: l_recog_line_2 NUMBER;
123379:
123380: l_num_entries NUMBER;
123381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
123382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
123383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
123384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
123385: l_recog_line_1 NUMBER;
123386: l_recog_line_2 NUMBER;
123387:
123380: l_num_entries NUMBER;
123381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
123382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
123383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
123384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
123385: l_recog_line_1 NUMBER;
123386: l_recog_line_2 NUMBER;
123387:
123388: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
123386: l_recog_line_2 NUMBER;
123387:
123388: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
123389: l_bflow_applied_to_amt NUMBER; -- 5132302
123390: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
123391:
123392: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
123393:
123394: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
123461: l_accrual_line_num := NULL; -- 4262811
123462: l_tmp_amt := NULL; -- 4262811
123463: --
123464:
123465: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
123466: l_balance_type_code <> 'B' THEN
123467: IF (NVL(p_source_33,'
123468: ') = 'REC_TAX' OR
123469: NVL(p_source_33,'
123537: --
123538: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
123539:
123540: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
123541: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
123542:
123543: -- 4955764
123544: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
123545: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
123659: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
123660:
123661: IF xla_accounting_cache_pkg.GetValueChar
123662: (p_source_code => 'LEDGER_CATEGORY_CODE'
123663: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
123664: AND l_bflow_method_code = 'PRIOR_ENTRY'
123665: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
123666: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
123667: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
123769: p_lookup_type => 'XLA_OWNER_TYPE'
123770: ,p_lookup_code => l_component_type_code
123771: )
123772: ,p_token_4 => 'PRODUCT_NAME'
123773: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123774: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123775: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123776: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123777: ,p_ae_header_id => NULL
123770: ,p_lookup_code => l_component_type_code
123771: )
123772: ,p_token_4 => 'PRODUCT_NAME'
123773: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123774: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123775: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123776: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123777: ,p_ae_header_id => NULL
123778: );
123771: )
123772: ,p_token_4 => 'PRODUCT_NAME'
123773: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123774: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123775: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123776: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123777: ,p_ae_header_id => NULL
123778: );
123779:
123772: ,p_token_4 => 'PRODUCT_NAME'
123773: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
123774: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
123775: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
123776: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
123777: ,p_ae_header_id => NULL
123778: );
123779:
123780: IF (C_LEVEL_ERROR>= g_log_level) THEN
123803: ----------------------------------------------------------------------------------
123804: -- 4219869 Business Flow
123805: -- Update journal entry status -- Need to generate this within IF
123806: ----------------------------------------------------------------------------------
123807: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
123808: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
123809: ,p_balance_type_code => l_balance_type_code
123810: );
123811:
123890:
123891: --
123892: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
123893: --
123894: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
123895: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
123896: ELSE
123897: ---------------------------------------------------------------------------------------------------
123898: -- 4262811a Switch Sign
123915:
123916: XLA_AE_LINES_PKG.ValidateCurrentLine;
123917: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
123918:
123919: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
123920: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
123921: ,p_balance_type_code => l_balance_type_code);
123922:
123923: END IF;
124088: l_tmp_amt NUMBER;
124089: l_acc_rev_natural_side_code VARCHAR2(1);
124090:
124091: l_num_entries NUMBER;
124092: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124093: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124094: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124095: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124096: l_recog_line_1 NUMBER;
124089: l_acc_rev_natural_side_code VARCHAR2(1);
124090:
124091: l_num_entries NUMBER;
124092: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124093: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124094: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124095: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124096: l_recog_line_1 NUMBER;
124097: l_recog_line_2 NUMBER;
124090:
124091: l_num_entries NUMBER;
124092: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124093: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124094: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124095: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124096: l_recog_line_1 NUMBER;
124097: l_recog_line_2 NUMBER;
124098:
124091: l_num_entries NUMBER;
124092: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124093: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124094: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124095: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124096: l_recog_line_1 NUMBER;
124097: l_recog_line_2 NUMBER;
124098:
124099: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
124097: l_recog_line_2 NUMBER;
124098:
124099: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
124100: l_bflow_applied_to_amt NUMBER; -- 5132302
124101: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
124102:
124103: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
124104:
124105: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
124172: l_accrual_line_num := NULL; -- 4262811
124173: l_tmp_amt := NULL; -- 4262811
124174: --
124175:
124176: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
124177: l_balance_type_code <> 'B' THEN
124178: IF (NVL(p_source_33,'
124179: ') = 'REC_TAX' OR
124180: NVL(p_source_33,'
124248: --
124249: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
124250:
124251: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
124252: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
124253:
124254: -- 4955764
124255: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
124256: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
124374: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
124375:
124376: IF xla_accounting_cache_pkg.GetValueChar
124377: (p_source_code => 'LEDGER_CATEGORY_CODE'
124378: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
124379: AND l_bflow_method_code = 'PRIOR_ENTRY'
124380: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
124381: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
124382: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
124484: p_lookup_type => 'XLA_OWNER_TYPE'
124485: ,p_lookup_code => l_component_type_code
124486: )
124487: ,p_token_4 => 'PRODUCT_NAME'
124488: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
124489: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
124490: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
124491: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
124492: ,p_ae_header_id => NULL
124485: ,p_lookup_code => l_component_type_code
124486: )
124487: ,p_token_4 => 'PRODUCT_NAME'
124488: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
124489: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
124490: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
124491: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
124492: ,p_ae_header_id => NULL
124493: );
124486: )
124487: ,p_token_4 => 'PRODUCT_NAME'
124488: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
124489: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
124490: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
124491: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
124492: ,p_ae_header_id => NULL
124493: );
124494:
124487: ,p_token_4 => 'PRODUCT_NAME'
124488: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
124489: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
124490: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
124491: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
124492: ,p_ae_header_id => NULL
124493: );
124494:
124495: IF (C_LEVEL_ERROR>= g_log_level) THEN
124518: ----------------------------------------------------------------------------------
124519: -- 4219869 Business Flow
124520: -- Update journal entry status -- Need to generate this within IF
124521: ----------------------------------------------------------------------------------
124522: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
124523: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
124524: ,p_balance_type_code => l_balance_type_code
124525: );
124526:
124605:
124606: --
124607: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
124608: --
124609: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
124610: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
124611: ELSE
124612: ---------------------------------------------------------------------------------------------------
124613: -- 4262811a Switch Sign
124630:
124631: XLA_AE_LINES_PKG.ValidateCurrentLine;
124632: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
124633:
124634: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
124635: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
124636: ,p_balance_type_code => l_balance_type_code);
124637:
124638: END IF;
124803: l_tmp_amt NUMBER;
124804: l_acc_rev_natural_side_code VARCHAR2(1);
124805:
124806: l_num_entries NUMBER;
124807: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124808: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124809: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124810: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124811: l_recog_line_1 NUMBER;
124804: l_acc_rev_natural_side_code VARCHAR2(1);
124805:
124806: l_num_entries NUMBER;
124807: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124808: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124809: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124810: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124811: l_recog_line_1 NUMBER;
124812: l_recog_line_2 NUMBER;
124805:
124806: l_num_entries NUMBER;
124807: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124808: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124809: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124810: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124811: l_recog_line_1 NUMBER;
124812: l_recog_line_2 NUMBER;
124813:
124806: l_num_entries NUMBER;
124807: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
124808: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
124809: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
124810: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
124811: l_recog_line_1 NUMBER;
124812: l_recog_line_2 NUMBER;
124813:
124814: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
124812: l_recog_line_2 NUMBER;
124813:
124814: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
124815: l_bflow_applied_to_amt NUMBER; -- 5132302
124816: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
124817:
124818: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
124819:
124820: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
124887: l_accrual_line_num := NULL; -- 4262811
124888: l_tmp_amt := NULL; -- 4262811
124889: --
124890:
124891: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
124892: l_balance_type_code <> 'B' THEN
124893: IF (NVL(p_source_33,'
124894: ') = 'REC_TAX' OR
124895: NVL(p_source_33,'
124963: --
124964: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
124965:
124966: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
124967: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
124968:
124969: -- 4955764
124970: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
124971: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
125087: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
125088:
125089: IF xla_accounting_cache_pkg.GetValueChar
125090: (p_source_code => 'LEDGER_CATEGORY_CODE'
125091: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
125092: AND l_bflow_method_code = 'PRIOR_ENTRY'
125093: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
125094: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
125095: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
125197: p_lookup_type => 'XLA_OWNER_TYPE'
125198: ,p_lookup_code => l_component_type_code
125199: )
125200: ,p_token_4 => 'PRODUCT_NAME'
125201: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125202: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125203: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125204: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125205: ,p_ae_header_id => NULL
125198: ,p_lookup_code => l_component_type_code
125199: )
125200: ,p_token_4 => 'PRODUCT_NAME'
125201: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125202: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125203: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125204: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125205: ,p_ae_header_id => NULL
125206: );
125199: )
125200: ,p_token_4 => 'PRODUCT_NAME'
125201: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125202: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125203: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125204: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125205: ,p_ae_header_id => NULL
125206: );
125207:
125200: ,p_token_4 => 'PRODUCT_NAME'
125201: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125202: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125203: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125204: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125205: ,p_ae_header_id => NULL
125206: );
125207:
125208: IF (C_LEVEL_ERROR>= g_log_level) THEN
125231: ----------------------------------------------------------------------------------
125232: -- 4219869 Business Flow
125233: -- Update journal entry status -- Need to generate this within IF
125234: ----------------------------------------------------------------------------------
125235: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
125236: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
125237: ,p_balance_type_code => l_balance_type_code
125238: );
125239:
125318:
125319: --
125320: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
125321: --
125322: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
125323: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
125324: ELSE
125325: ---------------------------------------------------------------------------------------------------
125326: -- 4262811a Switch Sign
125343:
125344: XLA_AE_LINES_PKG.ValidateCurrentLine;
125345: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
125346:
125347: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
125348: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
125349: ,p_balance_type_code => l_balance_type_code);
125350:
125351: END IF;
125519: l_tmp_amt NUMBER;
125520: l_acc_rev_natural_side_code VARCHAR2(1);
125521:
125522: l_num_entries NUMBER;
125523: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
125524: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
125525: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
125526: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
125527: l_recog_line_1 NUMBER;
125520: l_acc_rev_natural_side_code VARCHAR2(1);
125521:
125522: l_num_entries NUMBER;
125523: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
125524: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
125525: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
125526: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
125527: l_recog_line_1 NUMBER;
125528: l_recog_line_2 NUMBER;
125521:
125522: l_num_entries NUMBER;
125523: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
125524: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
125525: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
125526: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
125527: l_recog_line_1 NUMBER;
125528: l_recog_line_2 NUMBER;
125529:
125522: l_num_entries NUMBER;
125523: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
125524: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
125525: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
125526: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
125527: l_recog_line_1 NUMBER;
125528: l_recog_line_2 NUMBER;
125529:
125530: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
125528: l_recog_line_2 NUMBER;
125529:
125530: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
125531: l_bflow_applied_to_amt NUMBER; -- 5132302
125532: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
125533:
125534: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
125535:
125536: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
125603: l_accrual_line_num := NULL; -- 4262811
125604: l_tmp_amt := NULL; -- 4262811
125605: --
125606:
125607: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
125608: l_balance_type_code <> 'B' THEN
125609: IF NVL(p_source_33,'
125610: ') = 'NONREC_TAX' AND
125611: NVL(p_source_135,'
125679: --
125680: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
125681:
125682: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
125683: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
125684:
125685: -- 4955764
125686: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
125687: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
125803: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
125804:
125805: IF xla_accounting_cache_pkg.GetValueChar
125806: (p_source_code => 'LEDGER_CATEGORY_CODE'
125807: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
125808: AND l_bflow_method_code = 'PRIOR_ENTRY'
125809: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
125810: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
125811: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
125913: p_lookup_type => 'XLA_OWNER_TYPE'
125914: ,p_lookup_code => l_component_type_code
125915: )
125916: ,p_token_4 => 'PRODUCT_NAME'
125917: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125918: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125919: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125920: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125921: ,p_ae_header_id => NULL
125914: ,p_lookup_code => l_component_type_code
125915: )
125916: ,p_token_4 => 'PRODUCT_NAME'
125917: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125918: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125919: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125920: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125921: ,p_ae_header_id => NULL
125922: );
125915: )
125916: ,p_token_4 => 'PRODUCT_NAME'
125917: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125918: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125919: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125920: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125921: ,p_ae_header_id => NULL
125922: );
125923:
125916: ,p_token_4 => 'PRODUCT_NAME'
125917: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
125918: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
125919: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
125920: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
125921: ,p_ae_header_id => NULL
125922: );
125923:
125924: IF (C_LEVEL_ERROR>= g_log_level) THEN
125947: ----------------------------------------------------------------------------------
125948: -- 4219869 Business Flow
125949: -- Update journal entry status -- Need to generate this within IF
125950: ----------------------------------------------------------------------------------
125951: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
125952: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
125953: ,p_balance_type_code => l_balance_type_code
125954: );
125955:
126034:
126035: --
126036: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
126037: --
126038: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
126039: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
126040: ELSE
126041: ---------------------------------------------------------------------------------------------------
126042: -- 4262811a Switch Sign
126059:
126060: XLA_AE_LINES_PKG.ValidateCurrentLine;
126061: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
126062:
126063: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
126064: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
126065: ,p_balance_type_code => l_balance_type_code);
126066:
126067: END IF;
126235: l_tmp_amt NUMBER;
126236: l_acc_rev_natural_side_code VARCHAR2(1);
126237:
126238: l_num_entries NUMBER;
126239: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126240: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126241: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126242: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126243: l_recog_line_1 NUMBER;
126236: l_acc_rev_natural_side_code VARCHAR2(1);
126237:
126238: l_num_entries NUMBER;
126239: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126240: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126241: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126242: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126243: l_recog_line_1 NUMBER;
126244: l_recog_line_2 NUMBER;
126237:
126238: l_num_entries NUMBER;
126239: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126240: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126241: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126242: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126243: l_recog_line_1 NUMBER;
126244: l_recog_line_2 NUMBER;
126245:
126238: l_num_entries NUMBER;
126239: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126240: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126241: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126242: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126243: l_recog_line_1 NUMBER;
126244: l_recog_line_2 NUMBER;
126245:
126246: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
126244: l_recog_line_2 NUMBER;
126245:
126246: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
126247: l_bflow_applied_to_amt NUMBER; -- 5132302
126248: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
126249:
126250: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
126251:
126252: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
126319: l_accrual_line_num := NULL; -- 4262811
126320: l_tmp_amt := NULL; -- 4262811
126321: --
126322:
126323: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
126324: l_balance_type_code <> 'B' THEN
126325: IF NVL(p_source_33,'
126326: ') = 'NONREC_TAX' AND
126327: NVL(p_source_135,'
126395: --
126396: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
126397:
126398: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
126399: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
126400:
126401: -- 4955764
126402: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
126403: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
126519: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
126520:
126521: IF xla_accounting_cache_pkg.GetValueChar
126522: (p_source_code => 'LEDGER_CATEGORY_CODE'
126523: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
126524: AND l_bflow_method_code = 'PRIOR_ENTRY'
126525: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
126526: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
126527: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
126629: p_lookup_type => 'XLA_OWNER_TYPE'
126630: ,p_lookup_code => l_component_type_code
126631: )
126632: ,p_token_4 => 'PRODUCT_NAME'
126633: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
126634: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
126635: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
126636: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
126637: ,p_ae_header_id => NULL
126630: ,p_lookup_code => l_component_type_code
126631: )
126632: ,p_token_4 => 'PRODUCT_NAME'
126633: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
126634: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
126635: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
126636: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
126637: ,p_ae_header_id => NULL
126638: );
126631: )
126632: ,p_token_4 => 'PRODUCT_NAME'
126633: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
126634: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
126635: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
126636: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
126637: ,p_ae_header_id => NULL
126638: );
126639:
126632: ,p_token_4 => 'PRODUCT_NAME'
126633: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
126634: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
126635: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
126636: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
126637: ,p_ae_header_id => NULL
126638: );
126639:
126640: IF (C_LEVEL_ERROR>= g_log_level) THEN
126663: ----------------------------------------------------------------------------------
126664: -- 4219869 Business Flow
126665: -- Update journal entry status -- Need to generate this within IF
126666: ----------------------------------------------------------------------------------
126667: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
126668: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
126669: ,p_balance_type_code => l_balance_type_code
126670: );
126671:
126750:
126751: --
126752: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
126753: --
126754: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
126755: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
126756: ELSE
126757: ---------------------------------------------------------------------------------------------------
126758: -- 4262811a Switch Sign
126775:
126776: XLA_AE_LINES_PKG.ValidateCurrentLine;
126777: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
126778:
126779: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
126780: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
126781: ,p_balance_type_code => l_balance_type_code);
126782:
126783: END IF;
126949: l_tmp_amt NUMBER;
126950: l_acc_rev_natural_side_code VARCHAR2(1);
126951:
126952: l_num_entries NUMBER;
126953: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126954: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126955: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126956: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126957: l_recog_line_1 NUMBER;
126950: l_acc_rev_natural_side_code VARCHAR2(1);
126951:
126952: l_num_entries NUMBER;
126953: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126954: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126955: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126956: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126957: l_recog_line_1 NUMBER;
126958: l_recog_line_2 NUMBER;
126951:
126952: l_num_entries NUMBER;
126953: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126954: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126955: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126956: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126957: l_recog_line_1 NUMBER;
126958: l_recog_line_2 NUMBER;
126959:
126952: l_num_entries NUMBER;
126953: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
126954: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
126955: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
126956: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
126957: l_recog_line_1 NUMBER;
126958: l_recog_line_2 NUMBER;
126959:
126960: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
126958: l_recog_line_2 NUMBER;
126959:
126960: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
126961: l_bflow_applied_to_amt NUMBER; -- 5132302
126962: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
126963:
126964: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
126965:
126966: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
127033: l_accrual_line_num := NULL; -- 4262811
127034: l_tmp_amt := NULL; -- 4262811
127035: --
127036:
127037: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
127038: l_balance_type_code <> 'B' THEN
127039: IF NVL(p_source_33,'
127040: ') = 'NONREC_TAX' AND
127041: NVL(p_source_135,'
127109: --
127110: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
127111:
127112: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
127113: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
127114:
127115: -- 4955764
127116: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
127117: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
127231: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
127232:
127233: IF xla_accounting_cache_pkg.GetValueChar
127234: (p_source_code => 'LEDGER_CATEGORY_CODE'
127235: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
127236: AND l_bflow_method_code = 'PRIOR_ENTRY'
127237: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
127238: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
127239: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
127341: p_lookup_type => 'XLA_OWNER_TYPE'
127342: ,p_lookup_code => l_component_type_code
127343: )
127344: ,p_token_4 => 'PRODUCT_NAME'
127345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
127346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
127347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
127348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
127349: ,p_ae_header_id => NULL
127342: ,p_lookup_code => l_component_type_code
127343: )
127344: ,p_token_4 => 'PRODUCT_NAME'
127345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
127346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
127347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
127348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
127349: ,p_ae_header_id => NULL
127350: );
127343: )
127344: ,p_token_4 => 'PRODUCT_NAME'
127345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
127346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
127347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
127348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
127349: ,p_ae_header_id => NULL
127350: );
127351:
127344: ,p_token_4 => 'PRODUCT_NAME'
127345: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
127346: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
127347: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
127348: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
127349: ,p_ae_header_id => NULL
127350: );
127351:
127352: IF (C_LEVEL_ERROR>= g_log_level) THEN
127375: ----------------------------------------------------------------------------------
127376: -- 4219869 Business Flow
127377: -- Update journal entry status -- Need to generate this within IF
127378: ----------------------------------------------------------------------------------
127379: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
127380: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
127381: ,p_balance_type_code => l_balance_type_code
127382: );
127383:
127462:
127463: --
127464: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
127465: --
127466: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
127467: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
127468: ELSE
127469: ---------------------------------------------------------------------------------------------------
127470: -- 4262811a Switch Sign
127487:
127488: XLA_AE_LINES_PKG.ValidateCurrentLine;
127489: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
127490:
127491: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
127492: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
127493: ,p_balance_type_code => l_balance_type_code);
127494:
127495: END IF;
127663: l_tmp_amt NUMBER;
127664: l_acc_rev_natural_side_code VARCHAR2(1);
127665:
127666: l_num_entries NUMBER;
127667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
127668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
127669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
127670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
127671: l_recog_line_1 NUMBER;
127664: l_acc_rev_natural_side_code VARCHAR2(1);
127665:
127666: l_num_entries NUMBER;
127667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
127668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
127669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
127670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
127671: l_recog_line_1 NUMBER;
127672: l_recog_line_2 NUMBER;
127665:
127666: l_num_entries NUMBER;
127667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
127668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
127669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
127670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
127671: l_recog_line_1 NUMBER;
127672: l_recog_line_2 NUMBER;
127673:
127666: l_num_entries NUMBER;
127667: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
127668: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
127669: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
127670: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
127671: l_recog_line_1 NUMBER;
127672: l_recog_line_2 NUMBER;
127673:
127674: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
127672: l_recog_line_2 NUMBER;
127673:
127674: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
127675: l_bflow_applied_to_amt NUMBER; -- 5132302
127676: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
127677:
127678: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
127679:
127680: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
127747: l_accrual_line_num := NULL; -- 4262811
127748: l_tmp_amt := NULL; -- 4262811
127749: --
127750:
127751: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
127752: l_balance_type_code <> 'B' THEN
127753: IF NVL(p_source_33,'
127754: ') = 'NONREC_TAX' AND
127755: NVL(p_source_135,'
127823: --
127824: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
127825:
127826: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
127827: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
127828:
127829: -- 4955764
127830: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
127831: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
127949: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
127950:
127951: IF xla_accounting_cache_pkg.GetValueChar
127952: (p_source_code => 'LEDGER_CATEGORY_CODE'
127953: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
127954: AND l_bflow_method_code = 'PRIOR_ENTRY'
127955: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
127956: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
127957: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
128059: p_lookup_type => 'XLA_OWNER_TYPE'
128060: ,p_lookup_code => l_component_type_code
128061: )
128062: ,p_token_4 => 'PRODUCT_NAME'
128063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128067: ,p_ae_header_id => NULL
128060: ,p_lookup_code => l_component_type_code
128061: )
128062: ,p_token_4 => 'PRODUCT_NAME'
128063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128067: ,p_ae_header_id => NULL
128068: );
128061: )
128062: ,p_token_4 => 'PRODUCT_NAME'
128063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128067: ,p_ae_header_id => NULL
128068: );
128069:
128062: ,p_token_4 => 'PRODUCT_NAME'
128063: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128064: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128065: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128066: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128067: ,p_ae_header_id => NULL
128068: );
128069:
128070: IF (C_LEVEL_ERROR>= g_log_level) THEN
128093: ----------------------------------------------------------------------------------
128094: -- 4219869 Business Flow
128095: -- Update journal entry status -- Need to generate this within IF
128096: ----------------------------------------------------------------------------------
128097: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
128098: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
128099: ,p_balance_type_code => l_balance_type_code
128100: );
128101:
128180:
128181: --
128182: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
128183: --
128184: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
128185: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
128186: ELSE
128187: ---------------------------------------------------------------------------------------------------
128188: -- 4262811a Switch Sign
128205:
128206: XLA_AE_LINES_PKG.ValidateCurrentLine;
128207: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
128208:
128209: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
128210: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
128211: ,p_balance_type_code => l_balance_type_code);
128212:
128213: END IF;
128377: l_tmp_amt NUMBER;
128378: l_acc_rev_natural_side_code VARCHAR2(1);
128379:
128380: l_num_entries NUMBER;
128381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
128382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
128383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
128384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
128385: l_recog_line_1 NUMBER;
128378: l_acc_rev_natural_side_code VARCHAR2(1);
128379:
128380: l_num_entries NUMBER;
128381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
128382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
128383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
128384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
128385: l_recog_line_1 NUMBER;
128386: l_recog_line_2 NUMBER;
128379:
128380: l_num_entries NUMBER;
128381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
128382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
128383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
128384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
128385: l_recog_line_1 NUMBER;
128386: l_recog_line_2 NUMBER;
128387:
128380: l_num_entries NUMBER;
128381: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
128382: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
128383: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
128384: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
128385: l_recog_line_1 NUMBER;
128386: l_recog_line_2 NUMBER;
128387:
128388: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
128386: l_recog_line_2 NUMBER;
128387:
128388: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
128389: l_bflow_applied_to_amt NUMBER; -- 5132302
128390: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
128391:
128392: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
128393:
128394: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
128461: l_accrual_line_num := NULL; -- 4262811
128462: l_tmp_amt := NULL; -- 4262811
128463: --
128464:
128465: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
128466: l_balance_type_code <> 'B' THEN
128467: IF NVL(p_source_143,'
128468: ') = 'TAX DIFF'
128469: THEN
128533: --
128534: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
128535:
128536: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
128537: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
128538:
128539: -- 4955764
128540: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
128541: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
128659: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
128660:
128661: IF xla_accounting_cache_pkg.GetValueChar
128662: (p_source_code => 'LEDGER_CATEGORY_CODE'
128663: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
128664: AND l_bflow_method_code = 'PRIOR_ENTRY'
128665: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
128666: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
128667: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
128846: p_lookup_type => 'XLA_OWNER_TYPE'
128847: ,p_lookup_code => l_component_type_code
128848: )
128849: ,p_token_4 => 'PRODUCT_NAME'
128850: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128851: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128852: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128853: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128854: ,p_ae_header_id => NULL
128847: ,p_lookup_code => l_component_type_code
128848: )
128849: ,p_token_4 => 'PRODUCT_NAME'
128850: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128851: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128852: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128853: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128854: ,p_ae_header_id => NULL
128855: );
128848: )
128849: ,p_token_4 => 'PRODUCT_NAME'
128850: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128851: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128852: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128853: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128854: ,p_ae_header_id => NULL
128855: );
128856:
128849: ,p_token_4 => 'PRODUCT_NAME'
128850: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
128851: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
128852: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
128853: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
128854: ,p_ae_header_id => NULL
128855: );
128856:
128857: IF (C_LEVEL_ERROR>= g_log_level) THEN
128880: ----------------------------------------------------------------------------------
128881: -- 4219869 Business Flow
128882: -- Update journal entry status -- Need to generate this within IF
128883: ----------------------------------------------------------------------------------
128884: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
128885: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
128886: ,p_balance_type_code => l_balance_type_code
128887: );
128888:
129054:
129055: --
129056: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
129057: --
129058: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
129059: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
129060: ELSE
129061: ---------------------------------------------------------------------------------------------------
129062: -- 4262811a Switch Sign
129079:
129080: XLA_AE_LINES_PKG.ValidateCurrentLine;
129081: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
129082:
129083: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
129084: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
129085: ,p_balance_type_code => l_balance_type_code);
129086:
129087: END IF;
129265: l_tmp_amt NUMBER;
129266: l_acc_rev_natural_side_code VARCHAR2(1);
129267:
129268: l_num_entries NUMBER;
129269: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
129270: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
129271: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
129272: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
129273: l_recog_line_1 NUMBER;
129266: l_acc_rev_natural_side_code VARCHAR2(1);
129267:
129268: l_num_entries NUMBER;
129269: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
129270: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
129271: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
129272: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
129273: l_recog_line_1 NUMBER;
129274: l_recog_line_2 NUMBER;
129267:
129268: l_num_entries NUMBER;
129269: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
129270: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
129271: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
129272: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
129273: l_recog_line_1 NUMBER;
129274: l_recog_line_2 NUMBER;
129275:
129268: l_num_entries NUMBER;
129269: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
129270: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
129271: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
129272: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
129273: l_recog_line_1 NUMBER;
129274: l_recog_line_2 NUMBER;
129275:
129276: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
129274: l_recog_line_2 NUMBER;
129275:
129276: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
129277: l_bflow_applied_to_amt NUMBER; -- 5132302
129278: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
129279:
129280: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
129281:
129282: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
129348: l_acc_rev_flag := NULL; -- 4262811
129349: l_accrual_line_num := NULL; -- 4262811
129350: l_tmp_amt := NULL; -- 4262811
129351: --
129352: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
129353: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
129354: return;
129355: END IF;
129356:
129349: l_accrual_line_num := NULL; -- 4262811
129350: l_tmp_amt := NULL; -- 4262811
129351: --
129352: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
129353: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
129354: return;
129355: END IF;
129356:
129357: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
129353: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
129354: return;
129355: END IF;
129356:
129357: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
129358: l_balance_type_code <> 'B' THEN
129359: IF NVL(p_source_33,'
129360: ') = 'TERV' AND
129361: NVL(p_source_95,'
129427: --
129428: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
129429:
129430: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
129431: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
129432:
129433: -- 4955764
129434: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
129435: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
129551: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
129552:
129553: IF xla_accounting_cache_pkg.GetValueChar
129554: (p_source_code => 'LEDGER_CATEGORY_CODE'
129555: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
129556: AND l_bflow_method_code = 'PRIOR_ENTRY'
129557: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
129558: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
129559: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
129762: p_lookup_type => 'XLA_OWNER_TYPE'
129763: ,p_lookup_code => l_component_type_code
129764: )
129765: ,p_token_4 => 'PRODUCT_NAME'
129766: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
129767: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
129768: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
129769: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
129770: ,p_ae_header_id => NULL
129763: ,p_lookup_code => l_component_type_code
129764: )
129765: ,p_token_4 => 'PRODUCT_NAME'
129766: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
129767: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
129768: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
129769: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
129770: ,p_ae_header_id => NULL
129771: );
129764: )
129765: ,p_token_4 => 'PRODUCT_NAME'
129766: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
129767: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
129768: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
129769: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
129770: ,p_ae_header_id => NULL
129771: );
129772:
129765: ,p_token_4 => 'PRODUCT_NAME'
129766: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
129767: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
129768: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
129769: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
129770: ,p_ae_header_id => NULL
129771: );
129772:
129773: IF (C_LEVEL_ERROR>= g_log_level) THEN
129796: ----------------------------------------------------------------------------------
129797: -- 4219869 Business Flow
129798: -- Update journal entry status -- Need to generate this within IF
129799: ----------------------------------------------------------------------------------
129800: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
129801: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
129802: ,p_balance_type_code => l_balance_type_code
129803: );
129804:
129984:
129985: --
129986: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
129987: --
129988: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
129989: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
129990: ELSE
129991: ---------------------------------------------------------------------------------------------------
129992: -- 4262811a Switch Sign
130009:
130010: XLA_AE_LINES_PKG.ValidateCurrentLine;
130011: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
130012:
130013: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
130014: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
130015: ,p_balance_type_code => l_balance_type_code);
130016:
130017: END IF;
130193: l_tmp_amt NUMBER;
130194: l_acc_rev_natural_side_code VARCHAR2(1);
130195:
130196: l_num_entries NUMBER;
130197: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
130198: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
130199: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
130200: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
130201: l_recog_line_1 NUMBER;
130194: l_acc_rev_natural_side_code VARCHAR2(1);
130195:
130196: l_num_entries NUMBER;
130197: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
130198: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
130199: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
130200: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
130201: l_recog_line_1 NUMBER;
130202: l_recog_line_2 NUMBER;
130195:
130196: l_num_entries NUMBER;
130197: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
130198: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
130199: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
130200: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
130201: l_recog_line_1 NUMBER;
130202: l_recog_line_2 NUMBER;
130203:
130196: l_num_entries NUMBER;
130197: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
130198: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
130199: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
130200: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
130201: l_recog_line_1 NUMBER;
130202: l_recog_line_2 NUMBER;
130203:
130204: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
130202: l_recog_line_2 NUMBER;
130203:
130204: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
130205: l_bflow_applied_to_amt NUMBER; -- 5132302
130206: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
130207:
130208: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
130209:
130210: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
130276: l_acc_rev_flag := NULL; -- 4262811
130277: l_accrual_line_num := NULL; -- 4262811
130278: l_tmp_amt := NULL; -- 4262811
130279: --
130280: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
130281: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
130282: return;
130283: END IF;
130284:
130277: l_accrual_line_num := NULL; -- 4262811
130278: l_tmp_amt := NULL; -- 4262811
130279: --
130280: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
130281: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
130282: return;
130283: END IF;
130284:
130285: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
130281: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
130282: return;
130283: END IF;
130284:
130285: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
130286: l_balance_type_code <> 'B' THEN
130287: IF NVL(p_source_33,'
130288: ') = 'TERV' AND
130289: NVL(p_source_95,'
130355: --
130356: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
130357:
130358: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
130359: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
130360:
130361: -- 4955764
130362: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
130363: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
130477: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
130478:
130479: IF xla_accounting_cache_pkg.GetValueChar
130480: (p_source_code => 'LEDGER_CATEGORY_CODE'
130481: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
130482: AND l_bflow_method_code = 'PRIOR_ENTRY'
130483: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
130484: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
130485: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
130688: p_lookup_type => 'XLA_OWNER_TYPE'
130689: ,p_lookup_code => l_component_type_code
130690: )
130691: ,p_token_4 => 'PRODUCT_NAME'
130692: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
130693: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
130694: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
130695: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
130696: ,p_ae_header_id => NULL
130689: ,p_lookup_code => l_component_type_code
130690: )
130691: ,p_token_4 => 'PRODUCT_NAME'
130692: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
130693: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
130694: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
130695: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
130696: ,p_ae_header_id => NULL
130697: );
130690: )
130691: ,p_token_4 => 'PRODUCT_NAME'
130692: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
130693: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
130694: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
130695: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
130696: ,p_ae_header_id => NULL
130697: );
130698:
130691: ,p_token_4 => 'PRODUCT_NAME'
130692: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
130693: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
130694: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
130695: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
130696: ,p_ae_header_id => NULL
130697: );
130698:
130699: IF (C_LEVEL_ERROR>= g_log_level) THEN
130722: ----------------------------------------------------------------------------------
130723: -- 4219869 Business Flow
130724: -- Update journal entry status -- Need to generate this within IF
130725: ----------------------------------------------------------------------------------
130726: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
130727: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
130728: ,p_balance_type_code => l_balance_type_code
130729: );
130730:
130910:
130911: --
130912: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
130913: --
130914: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
130915: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
130916: ELSE
130917: ---------------------------------------------------------------------------------------------------
130918: -- 4262811a Switch Sign
130935:
130936: XLA_AE_LINES_PKG.ValidateCurrentLine;
130937: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
130938:
130939: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
130940: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
130941: ,p_balance_type_code => l_balance_type_code);
130942:
130943: END IF;
131121: l_tmp_amt NUMBER;
131122: l_acc_rev_natural_side_code VARCHAR2(1);
131123:
131124: l_num_entries NUMBER;
131125: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
131126: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
131127: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
131128: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
131129: l_recog_line_1 NUMBER;
131122: l_acc_rev_natural_side_code VARCHAR2(1);
131123:
131124: l_num_entries NUMBER;
131125: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
131126: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
131127: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
131128: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
131129: l_recog_line_1 NUMBER;
131130: l_recog_line_2 NUMBER;
131123:
131124: l_num_entries NUMBER;
131125: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
131126: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
131127: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
131128: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
131129: l_recog_line_1 NUMBER;
131130: l_recog_line_2 NUMBER;
131131:
131124: l_num_entries NUMBER;
131125: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
131126: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
131127: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
131128: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
131129: l_recog_line_1 NUMBER;
131130: l_recog_line_2 NUMBER;
131131:
131132: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
131130: l_recog_line_2 NUMBER;
131131:
131132: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
131133: l_bflow_applied_to_amt NUMBER; -- 5132302
131134: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
131135:
131136: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
131137:
131138: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
131204: l_acc_rev_flag := NULL; -- 4262811
131205: l_accrual_line_num := NULL; -- 4262811
131206: l_tmp_amt := NULL; -- 4262811
131207: --
131208: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
131209: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
131210: return;
131211: END IF;
131212:
131205: l_accrual_line_num := NULL; -- 4262811
131206: l_tmp_amt := NULL; -- 4262811
131207: --
131208: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
131209: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
131210: return;
131211: END IF;
131212:
131213: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
131209: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
131210: return;
131211: END IF;
131212:
131213: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
131214: l_balance_type_code <> 'B' THEN
131215: IF NVL(p_source_33,'
131216: ') = 'TERV' AND
131217: NVL(p_source_95,'
131283: --
131284: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
131285:
131286: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
131287: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
131288:
131289: -- 4955764
131290: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
131291: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
131409: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
131410:
131411: IF xla_accounting_cache_pkg.GetValueChar
131412: (p_source_code => 'LEDGER_CATEGORY_CODE'
131413: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
131414: AND l_bflow_method_code = 'PRIOR_ENTRY'
131415: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
131416: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
131417: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
131620: p_lookup_type => 'XLA_OWNER_TYPE'
131621: ,p_lookup_code => l_component_type_code
131622: )
131623: ,p_token_4 => 'PRODUCT_NAME'
131624: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
131625: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
131626: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
131627: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
131628: ,p_ae_header_id => NULL
131621: ,p_lookup_code => l_component_type_code
131622: )
131623: ,p_token_4 => 'PRODUCT_NAME'
131624: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
131625: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
131626: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
131627: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
131628: ,p_ae_header_id => NULL
131629: );
131622: )
131623: ,p_token_4 => 'PRODUCT_NAME'
131624: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
131625: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
131626: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
131627: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
131628: ,p_ae_header_id => NULL
131629: );
131630:
131623: ,p_token_4 => 'PRODUCT_NAME'
131624: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
131625: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
131626: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
131627: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
131628: ,p_ae_header_id => NULL
131629: );
131630:
131631: IF (C_LEVEL_ERROR>= g_log_level) THEN
131654: ----------------------------------------------------------------------------------
131655: -- 4219869 Business Flow
131656: -- Update journal entry status -- Need to generate this within IF
131657: ----------------------------------------------------------------------------------
131658: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
131659: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
131660: ,p_balance_type_code => l_balance_type_code
131661: );
131662:
131842:
131843: --
131844: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
131845: --
131846: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
131847: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
131848: ELSE
131849: ---------------------------------------------------------------------------------------------------
131850: -- 4262811a Switch Sign
131867:
131868: XLA_AE_LINES_PKG.ValidateCurrentLine;
131869: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
131870:
131871: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
131872: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
131873: ,p_balance_type_code => l_balance_type_code);
131874:
131875: END IF;
132053: l_tmp_amt NUMBER;
132054: l_acc_rev_natural_side_code VARCHAR2(1);
132055:
132056: l_num_entries NUMBER;
132057: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132058: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132059: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132060: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132061: l_recog_line_1 NUMBER;
132054: l_acc_rev_natural_side_code VARCHAR2(1);
132055:
132056: l_num_entries NUMBER;
132057: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132058: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132059: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132060: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132061: l_recog_line_1 NUMBER;
132062: l_recog_line_2 NUMBER;
132055:
132056: l_num_entries NUMBER;
132057: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132058: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132059: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132060: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132061: l_recog_line_1 NUMBER;
132062: l_recog_line_2 NUMBER;
132063:
132056: l_num_entries NUMBER;
132057: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132058: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132059: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132060: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132061: l_recog_line_1 NUMBER;
132062: l_recog_line_2 NUMBER;
132063:
132064: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
132062: l_recog_line_2 NUMBER;
132063:
132064: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
132065: l_bflow_applied_to_amt NUMBER; -- 5132302
132066: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
132067:
132068: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
132069:
132070: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
132136: l_acc_rev_flag := NULL; -- 4262811
132137: l_accrual_line_num := NULL; -- 4262811
132138: l_tmp_amt := NULL; -- 4262811
132139: --
132140: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
132141: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
132142: return;
132143: END IF;
132144:
132137: l_accrual_line_num := NULL; -- 4262811
132138: l_tmp_amt := NULL; -- 4262811
132139: --
132140: IF ((p_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
132141: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
132142: return;
132143: END IF;
132144:
132145: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
132141: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y')) THEN
132142: return;
132143: END IF;
132144:
132145: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
132146: l_balance_type_code <> 'B' THEN
132147: IF NVL(p_source_33,'
132148: ') = 'TERV' AND
132149: NVL(p_source_95,'
132215: --
132216: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
132217:
132218: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
132219: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
132220:
132221: -- 4955764
132222: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
132223: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
132339: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
132340:
132341: IF xla_accounting_cache_pkg.GetValueChar
132342: (p_source_code => 'LEDGER_CATEGORY_CODE'
132343: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
132344: AND l_bflow_method_code = 'PRIOR_ENTRY'
132345: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
132346: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
132347: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
132550: p_lookup_type => 'XLA_OWNER_TYPE'
132551: ,p_lookup_code => l_component_type_code
132552: )
132553: ,p_token_4 => 'PRODUCT_NAME'
132554: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
132555: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
132556: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
132557: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
132558: ,p_ae_header_id => NULL
132551: ,p_lookup_code => l_component_type_code
132552: )
132553: ,p_token_4 => 'PRODUCT_NAME'
132554: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
132555: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
132556: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
132557: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
132558: ,p_ae_header_id => NULL
132559: );
132552: )
132553: ,p_token_4 => 'PRODUCT_NAME'
132554: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
132555: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
132556: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
132557: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
132558: ,p_ae_header_id => NULL
132559: );
132560:
132553: ,p_token_4 => 'PRODUCT_NAME'
132554: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
132555: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
132556: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
132557: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
132558: ,p_ae_header_id => NULL
132559: );
132560:
132561: IF (C_LEVEL_ERROR>= g_log_level) THEN
132584: ----------------------------------------------------------------------------------
132585: -- 4219869 Business Flow
132586: -- Update journal entry status -- Need to generate this within IF
132587: ----------------------------------------------------------------------------------
132588: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
132589: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
132590: ,p_balance_type_code => l_balance_type_code
132591: );
132592:
132772:
132773: --
132774: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
132775: --
132776: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
132777: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
132778: ELSE
132779: ---------------------------------------------------------------------------------------------------
132780: -- 4262811a Switch Sign
132797:
132798: XLA_AE_LINES_PKG.ValidateCurrentLine;
132799: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
132800:
132801: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
132802: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
132803: ,p_balance_type_code => l_balance_type_code);
132804:
132805: END IF;
132970: l_tmp_amt NUMBER;
132971: l_acc_rev_natural_side_code VARCHAR2(1);
132972:
132973: l_num_entries NUMBER;
132974: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132975: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132976: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132977: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132978: l_recog_line_1 NUMBER;
132971: l_acc_rev_natural_side_code VARCHAR2(1);
132972:
132973: l_num_entries NUMBER;
132974: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132975: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132976: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132977: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132978: l_recog_line_1 NUMBER;
132979: l_recog_line_2 NUMBER;
132972:
132973: l_num_entries NUMBER;
132974: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132975: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132976: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132977: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132978: l_recog_line_1 NUMBER;
132979: l_recog_line_2 NUMBER;
132980:
132973: l_num_entries NUMBER;
132974: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
132975: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
132976: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
132977: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
132978: l_recog_line_1 NUMBER;
132979: l_recog_line_2 NUMBER;
132980:
132981: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
132979: l_recog_line_2 NUMBER;
132980:
132981: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
132982: l_bflow_applied_to_amt NUMBER; -- 5132302
132983: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
132984:
132985: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
132986:
132987: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
133054: l_accrual_line_num := NULL; -- 4262811
133055: l_tmp_amt := NULL; -- 4262811
133056: --
133057:
133058: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
133059: l_balance_type_code <> 'B' THEN
133060: IF NVL(p_source_33,'
133061: ') = 'TIPV' AND
133062: NVL(p_source_95,'
133128: --
133129: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
133130:
133131: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
133132: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
133133:
133134: -- 4955764
133135: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
133136: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
133252: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
133253:
133254: IF xla_accounting_cache_pkg.GetValueChar
133255: (p_source_code => 'LEDGER_CATEGORY_CODE'
133256: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
133257: AND l_bflow_method_code = 'PRIOR_ENTRY'
133258: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
133259: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
133260: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
133362: p_lookup_type => 'XLA_OWNER_TYPE'
133363: ,p_lookup_code => l_component_type_code
133364: )
133365: ,p_token_4 => 'PRODUCT_NAME'
133366: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
133367: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
133368: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
133369: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
133370: ,p_ae_header_id => NULL
133363: ,p_lookup_code => l_component_type_code
133364: )
133365: ,p_token_4 => 'PRODUCT_NAME'
133366: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
133367: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
133368: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
133369: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
133370: ,p_ae_header_id => NULL
133371: );
133364: )
133365: ,p_token_4 => 'PRODUCT_NAME'
133366: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
133367: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
133368: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
133369: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
133370: ,p_ae_header_id => NULL
133371: );
133372:
133365: ,p_token_4 => 'PRODUCT_NAME'
133366: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
133367: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
133368: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
133369: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
133370: ,p_ae_header_id => NULL
133371: );
133372:
133373: IF (C_LEVEL_ERROR>= g_log_level) THEN
133396: ----------------------------------------------------------------------------------
133397: -- 4219869 Business Flow
133398: -- Update journal entry status -- Need to generate this within IF
133399: ----------------------------------------------------------------------------------
133400: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
133401: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
133402: ,p_balance_type_code => l_balance_type_code
133403: );
133404:
133483:
133484: --
133485: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
133486: --
133487: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
133488: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
133489: ELSE
133490: ---------------------------------------------------------------------------------------------------
133491: -- 4262811a Switch Sign
133508:
133509: XLA_AE_LINES_PKG.ValidateCurrentLine;
133510: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
133511:
133512: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
133513: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
133514: ,p_balance_type_code => l_balance_type_code);
133515:
133516: END IF;
133679: l_tmp_amt NUMBER;
133680: l_acc_rev_natural_side_code VARCHAR2(1);
133681:
133682: l_num_entries NUMBER;
133683: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
133684: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
133685: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
133686: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
133687: l_recog_line_1 NUMBER;
133680: l_acc_rev_natural_side_code VARCHAR2(1);
133681:
133682: l_num_entries NUMBER;
133683: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
133684: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
133685: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
133686: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
133687: l_recog_line_1 NUMBER;
133688: l_recog_line_2 NUMBER;
133681:
133682: l_num_entries NUMBER;
133683: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
133684: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
133685: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
133686: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
133687: l_recog_line_1 NUMBER;
133688: l_recog_line_2 NUMBER;
133689:
133682: l_num_entries NUMBER;
133683: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
133684: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
133685: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
133686: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
133687: l_recog_line_1 NUMBER;
133688: l_recog_line_2 NUMBER;
133689:
133690: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
133688: l_recog_line_2 NUMBER;
133689:
133690: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
133691: l_bflow_applied_to_amt NUMBER; -- 5132302
133692: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
133693:
133694: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
133695:
133696: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
133763: l_accrual_line_num := NULL; -- 4262811
133764: l_tmp_amt := NULL; -- 4262811
133765: --
133766:
133767: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
133768: l_balance_type_code <> 'B' THEN
133769: IF NVL(p_source_33,'
133770: ') = 'TIPV' AND
133771: NVL(p_source_95,'
133837: --
133838: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
133839:
133840: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
133841: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
133842:
133843: -- 4955764
133844: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
133845: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
133959: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
133960:
133961: IF xla_accounting_cache_pkg.GetValueChar
133962: (p_source_code => 'LEDGER_CATEGORY_CODE'
133963: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
133964: AND l_bflow_method_code = 'PRIOR_ENTRY'
133965: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
133966: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
133967: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
134069: p_lookup_type => 'XLA_OWNER_TYPE'
134070: ,p_lookup_code => l_component_type_code
134071: )
134072: ,p_token_4 => 'PRODUCT_NAME'
134073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134077: ,p_ae_header_id => NULL
134070: ,p_lookup_code => l_component_type_code
134071: )
134072: ,p_token_4 => 'PRODUCT_NAME'
134073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134077: ,p_ae_header_id => NULL
134078: );
134071: )
134072: ,p_token_4 => 'PRODUCT_NAME'
134073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134077: ,p_ae_header_id => NULL
134078: );
134079:
134072: ,p_token_4 => 'PRODUCT_NAME'
134073: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134074: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134075: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134076: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134077: ,p_ae_header_id => NULL
134078: );
134079:
134080: IF (C_LEVEL_ERROR>= g_log_level) THEN
134103: ----------------------------------------------------------------------------------
134104: -- 4219869 Business Flow
134105: -- Update journal entry status -- Need to generate this within IF
134106: ----------------------------------------------------------------------------------
134107: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
134108: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
134109: ,p_balance_type_code => l_balance_type_code
134110: );
134111:
134190:
134191: --
134192: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
134193: --
134194: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
134195: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
134196: ELSE
134197: ---------------------------------------------------------------------------------------------------
134198: -- 4262811a Switch Sign
134215:
134216: XLA_AE_LINES_PKG.ValidateCurrentLine;
134217: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
134218:
134219: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
134220: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
134221: ,p_balance_type_code => l_balance_type_code);
134222:
134223: END IF;
134388: l_tmp_amt NUMBER;
134389: l_acc_rev_natural_side_code VARCHAR2(1);
134390:
134391: l_num_entries NUMBER;
134392: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
134393: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
134394: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
134395: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
134396: l_recog_line_1 NUMBER;
134389: l_acc_rev_natural_side_code VARCHAR2(1);
134390:
134391: l_num_entries NUMBER;
134392: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
134393: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
134394: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
134395: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
134396: l_recog_line_1 NUMBER;
134397: l_recog_line_2 NUMBER;
134390:
134391: l_num_entries NUMBER;
134392: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
134393: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
134394: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
134395: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
134396: l_recog_line_1 NUMBER;
134397: l_recog_line_2 NUMBER;
134398:
134391: l_num_entries NUMBER;
134392: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
134393: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
134394: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
134395: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
134396: l_recog_line_1 NUMBER;
134397: l_recog_line_2 NUMBER;
134398:
134399: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
134397: l_recog_line_2 NUMBER;
134398:
134399: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
134400: l_bflow_applied_to_amt NUMBER; -- 5132302
134401: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
134402:
134403: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
134404:
134405: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
134472: l_accrual_line_num := NULL; -- 4262811
134473: l_tmp_amt := NULL; -- 4262811
134474: --
134475:
134476: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
134477: l_balance_type_code <> 'B' THEN
134478: IF NVL(p_source_33,'
134479: ') = 'TIPV' AND
134480: NVL(p_source_95,'
134546: --
134547: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
134548:
134549: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
134550: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
134551:
134552: -- 4955764
134553: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
134554: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
134672: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
134673:
134674: IF xla_accounting_cache_pkg.GetValueChar
134675: (p_source_code => 'LEDGER_CATEGORY_CODE'
134676: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
134677: AND l_bflow_method_code = 'PRIOR_ENTRY'
134678: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
134679: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
134680: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
134782: p_lookup_type => 'XLA_OWNER_TYPE'
134783: ,p_lookup_code => l_component_type_code
134784: )
134785: ,p_token_4 => 'PRODUCT_NAME'
134786: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134787: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134788: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134789: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134790: ,p_ae_header_id => NULL
134783: ,p_lookup_code => l_component_type_code
134784: )
134785: ,p_token_4 => 'PRODUCT_NAME'
134786: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134787: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134788: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134789: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134790: ,p_ae_header_id => NULL
134791: );
134784: )
134785: ,p_token_4 => 'PRODUCT_NAME'
134786: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134787: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134788: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134789: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134790: ,p_ae_header_id => NULL
134791: );
134792:
134785: ,p_token_4 => 'PRODUCT_NAME'
134786: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
134787: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
134788: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
134789: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
134790: ,p_ae_header_id => NULL
134791: );
134792:
134793: IF (C_LEVEL_ERROR>= g_log_level) THEN
134816: ----------------------------------------------------------------------------------
134817: -- 4219869 Business Flow
134818: -- Update journal entry status -- Need to generate this within IF
134819: ----------------------------------------------------------------------------------
134820: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
134821: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
134822: ,p_balance_type_code => l_balance_type_code
134823: );
134824:
134903:
134904: --
134905: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
134906: --
134907: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
134908: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
134909: ELSE
134910: ---------------------------------------------------------------------------------------------------
134911: -- 4262811a Switch Sign
134928:
134929: XLA_AE_LINES_PKG.ValidateCurrentLine;
134930: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
134931:
134932: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
134933: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
134934: ,p_balance_type_code => l_balance_type_code);
134935:
134936: END IF;
135101: l_tmp_amt NUMBER;
135102: l_acc_rev_natural_side_code VARCHAR2(1);
135103:
135104: l_num_entries NUMBER;
135105: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135106: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135107: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135108: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135109: l_recog_line_1 NUMBER;
135102: l_acc_rev_natural_side_code VARCHAR2(1);
135103:
135104: l_num_entries NUMBER;
135105: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135106: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135107: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135108: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135109: l_recog_line_1 NUMBER;
135110: l_recog_line_2 NUMBER;
135103:
135104: l_num_entries NUMBER;
135105: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135106: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135107: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135108: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135109: l_recog_line_1 NUMBER;
135110: l_recog_line_2 NUMBER;
135111:
135104: l_num_entries NUMBER;
135105: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135106: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135107: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135108: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135109: l_recog_line_1 NUMBER;
135110: l_recog_line_2 NUMBER;
135111:
135112: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
135110: l_recog_line_2 NUMBER;
135111:
135112: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
135113: l_bflow_applied_to_amt NUMBER; -- 5132302
135114: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
135115:
135116: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
135117:
135118: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
135185: l_accrual_line_num := NULL; -- 4262811
135186: l_tmp_amt := NULL; -- 4262811
135187: --
135188:
135189: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
135190: l_balance_type_code <> 'B' THEN
135191: IF NVL(p_source_33,'
135192: ') = 'TIPV' AND
135193: NVL(p_source_95,'
135259: --
135260: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
135261:
135262: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
135263: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
135264:
135265: -- 4955764
135266: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
135267: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
135383: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
135384:
135385: IF xla_accounting_cache_pkg.GetValueChar
135386: (p_source_code => 'LEDGER_CATEGORY_CODE'
135387: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
135388: AND l_bflow_method_code = 'PRIOR_ENTRY'
135389: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
135390: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
135391: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
135493: p_lookup_type => 'XLA_OWNER_TYPE'
135494: ,p_lookup_code => l_component_type_code
135495: )
135496: ,p_token_4 => 'PRODUCT_NAME'
135497: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
135498: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
135499: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
135500: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
135501: ,p_ae_header_id => NULL
135494: ,p_lookup_code => l_component_type_code
135495: )
135496: ,p_token_4 => 'PRODUCT_NAME'
135497: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
135498: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
135499: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
135500: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
135501: ,p_ae_header_id => NULL
135502: );
135495: )
135496: ,p_token_4 => 'PRODUCT_NAME'
135497: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
135498: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
135499: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
135500: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
135501: ,p_ae_header_id => NULL
135502: );
135503:
135496: ,p_token_4 => 'PRODUCT_NAME'
135497: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
135498: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
135499: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
135500: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
135501: ,p_ae_header_id => NULL
135502: );
135503:
135504: IF (C_LEVEL_ERROR>= g_log_level) THEN
135527: ----------------------------------------------------------------------------------
135528: -- 4219869 Business Flow
135529: -- Update journal entry status -- Need to generate this within IF
135530: ----------------------------------------------------------------------------------
135531: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
135532: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
135533: ,p_balance_type_code => l_balance_type_code
135534: );
135535:
135614:
135615: --
135616: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
135617: --
135618: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
135619: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
135620: ELSE
135621: ---------------------------------------------------------------------------------------------------
135622: -- 4262811a Switch Sign
135639:
135640: XLA_AE_LINES_PKG.ValidateCurrentLine;
135641: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
135642:
135643: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
135644: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
135645: ,p_balance_type_code => l_balance_type_code);
135646:
135647: END IF;
135812: l_tmp_amt NUMBER;
135813: l_acc_rev_natural_side_code VARCHAR2(1);
135814:
135815: l_num_entries NUMBER;
135816: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135817: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135818: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135819: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135820: l_recog_line_1 NUMBER;
135813: l_acc_rev_natural_side_code VARCHAR2(1);
135814:
135815: l_num_entries NUMBER;
135816: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135817: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135818: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135819: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135820: l_recog_line_1 NUMBER;
135821: l_recog_line_2 NUMBER;
135814:
135815: l_num_entries NUMBER;
135816: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135817: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135818: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135819: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135820: l_recog_line_1 NUMBER;
135821: l_recog_line_2 NUMBER;
135822:
135815: l_num_entries NUMBER;
135816: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
135817: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
135818: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
135819: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
135820: l_recog_line_1 NUMBER;
135821: l_recog_line_2 NUMBER;
135822:
135823: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
135821: l_recog_line_2 NUMBER;
135822:
135823: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
135824: l_bflow_applied_to_amt NUMBER; -- 5132302
135825: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
135826:
135827: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
135828:
135829: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
135896: l_accrual_line_num := NULL; -- 4262811
135897: l_tmp_amt := NULL; -- 4262811
135898: --
135899:
135900: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
135901: l_balance_type_code <> 'B' THEN
135902: IF NVL(p_source_33,'
135903: ') = 'TRV' AND
135904: NVL(p_source_95,'
135970: --
135971: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
135972:
135973: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
135974: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
135975:
135976: -- 4955764
135977: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
135978: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
136094: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
136095:
136096: IF xla_accounting_cache_pkg.GetValueChar
136097: (p_source_code => 'LEDGER_CATEGORY_CODE'
136098: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
136099: AND l_bflow_method_code = 'PRIOR_ENTRY'
136100: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
136101: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
136102: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
136204: p_lookup_type => 'XLA_OWNER_TYPE'
136205: ,p_lookup_code => l_component_type_code
136206: )
136207: ,p_token_4 => 'PRODUCT_NAME'
136208: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136209: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136210: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136211: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136212: ,p_ae_header_id => NULL
136205: ,p_lookup_code => l_component_type_code
136206: )
136207: ,p_token_4 => 'PRODUCT_NAME'
136208: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136209: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136210: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136211: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136212: ,p_ae_header_id => NULL
136213: );
136206: )
136207: ,p_token_4 => 'PRODUCT_NAME'
136208: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136209: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136210: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136211: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136212: ,p_ae_header_id => NULL
136213: );
136214:
136207: ,p_token_4 => 'PRODUCT_NAME'
136208: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136209: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136210: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136211: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136212: ,p_ae_header_id => NULL
136213: );
136214:
136215: IF (C_LEVEL_ERROR>= g_log_level) THEN
136238: ----------------------------------------------------------------------------------
136239: -- 4219869 Business Flow
136240: -- Update journal entry status -- Need to generate this within IF
136241: ----------------------------------------------------------------------------------
136242: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
136243: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
136244: ,p_balance_type_code => l_balance_type_code
136245: );
136246:
136325:
136326: --
136327: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
136328: --
136329: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
136330: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
136331: ELSE
136332: ---------------------------------------------------------------------------------------------------
136333: -- 4262811a Switch Sign
136350:
136351: XLA_AE_LINES_PKG.ValidateCurrentLine;
136352: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
136353:
136354: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
136355: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
136356: ,p_balance_type_code => l_balance_type_code);
136357:
136358: END IF;
136521: l_tmp_amt NUMBER;
136522: l_acc_rev_natural_side_code VARCHAR2(1);
136523:
136524: l_num_entries NUMBER;
136525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
136526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
136527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
136528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
136529: l_recog_line_1 NUMBER;
136522: l_acc_rev_natural_side_code VARCHAR2(1);
136523:
136524: l_num_entries NUMBER;
136525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
136526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
136527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
136528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
136529: l_recog_line_1 NUMBER;
136530: l_recog_line_2 NUMBER;
136523:
136524: l_num_entries NUMBER;
136525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
136526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
136527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
136528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
136529: l_recog_line_1 NUMBER;
136530: l_recog_line_2 NUMBER;
136531:
136524: l_num_entries NUMBER;
136525: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
136526: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
136527: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
136528: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
136529: l_recog_line_1 NUMBER;
136530: l_recog_line_2 NUMBER;
136531:
136532: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
136530: l_recog_line_2 NUMBER;
136531:
136532: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
136533: l_bflow_applied_to_amt NUMBER; -- 5132302
136534: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
136535:
136536: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
136537:
136538: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
136605: l_accrual_line_num := NULL; -- 4262811
136606: l_tmp_amt := NULL; -- 4262811
136607: --
136608:
136609: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
136610: l_balance_type_code <> 'B' THEN
136611: IF NVL(p_source_33,'
136612: ') = 'TRV' AND
136613: NVL(p_source_95,'
136679: --
136680: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
136681:
136682: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
136683: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
136684:
136685: -- 4955764
136686: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
136687: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
136801: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
136802:
136803: IF xla_accounting_cache_pkg.GetValueChar
136804: (p_source_code => 'LEDGER_CATEGORY_CODE'
136805: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
136806: AND l_bflow_method_code = 'PRIOR_ENTRY'
136807: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
136808: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
136809: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
136911: p_lookup_type => 'XLA_OWNER_TYPE'
136912: ,p_lookup_code => l_component_type_code
136913: )
136914: ,p_token_4 => 'PRODUCT_NAME'
136915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136919: ,p_ae_header_id => NULL
136912: ,p_lookup_code => l_component_type_code
136913: )
136914: ,p_token_4 => 'PRODUCT_NAME'
136915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136919: ,p_ae_header_id => NULL
136920: );
136913: )
136914: ,p_token_4 => 'PRODUCT_NAME'
136915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136919: ,p_ae_header_id => NULL
136920: );
136921:
136914: ,p_token_4 => 'PRODUCT_NAME'
136915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
136916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
136917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
136918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
136919: ,p_ae_header_id => NULL
136920: );
136921:
136922: IF (C_LEVEL_ERROR>= g_log_level) THEN
136945: ----------------------------------------------------------------------------------
136946: -- 4219869 Business Flow
136947: -- Update journal entry status -- Need to generate this within IF
136948: ----------------------------------------------------------------------------------
136949: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
136950: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
136951: ,p_balance_type_code => l_balance_type_code
136952: );
136953:
137032:
137033: --
137034: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
137035: --
137036: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
137037: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
137038: ELSE
137039: ---------------------------------------------------------------------------------------------------
137040: -- 4262811a Switch Sign
137057:
137058: XLA_AE_LINES_PKG.ValidateCurrentLine;
137059: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
137060:
137061: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
137062: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
137063: ,p_balance_type_code => l_balance_type_code);
137064:
137065: END IF;
137230: l_tmp_amt NUMBER;
137231: l_acc_rev_natural_side_code VARCHAR2(1);
137232:
137233: l_num_entries NUMBER;
137234: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137235: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137236: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137237: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137238: l_recog_line_1 NUMBER;
137231: l_acc_rev_natural_side_code VARCHAR2(1);
137232:
137233: l_num_entries NUMBER;
137234: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137235: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137236: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137237: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137238: l_recog_line_1 NUMBER;
137239: l_recog_line_2 NUMBER;
137232:
137233: l_num_entries NUMBER;
137234: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137235: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137236: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137237: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137238: l_recog_line_1 NUMBER;
137239: l_recog_line_2 NUMBER;
137240:
137233: l_num_entries NUMBER;
137234: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137235: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137236: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137237: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137238: l_recog_line_1 NUMBER;
137239: l_recog_line_2 NUMBER;
137240:
137241: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
137239: l_recog_line_2 NUMBER;
137240:
137241: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
137242: l_bflow_applied_to_amt NUMBER; -- 5132302
137243: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
137244:
137245: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
137246:
137247: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
137314: l_accrual_line_num := NULL; -- 4262811
137315: l_tmp_amt := NULL; -- 4262811
137316: --
137317:
137318: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
137319: l_balance_type_code <> 'B' THEN
137320: IF NVL(p_source_33,'
137321: ') = 'TRV' AND
137322: NVL(p_source_95,'
137388: --
137389: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
137390:
137391: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
137392: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
137393:
137394: -- 4955764
137395: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
137396: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
137514: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
137515:
137516: IF xla_accounting_cache_pkg.GetValueChar
137517: (p_source_code => 'LEDGER_CATEGORY_CODE'
137518: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
137519: AND l_bflow_method_code = 'PRIOR_ENTRY'
137520: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
137521: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
137522: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
137624: p_lookup_type => 'XLA_OWNER_TYPE'
137625: ,p_lookup_code => l_component_type_code
137626: )
137627: ,p_token_4 => 'PRODUCT_NAME'
137628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
137629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
137630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
137631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
137632: ,p_ae_header_id => NULL
137625: ,p_lookup_code => l_component_type_code
137626: )
137627: ,p_token_4 => 'PRODUCT_NAME'
137628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
137629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
137630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
137631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
137632: ,p_ae_header_id => NULL
137633: );
137626: )
137627: ,p_token_4 => 'PRODUCT_NAME'
137628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
137629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
137630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
137631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
137632: ,p_ae_header_id => NULL
137633: );
137634:
137627: ,p_token_4 => 'PRODUCT_NAME'
137628: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
137629: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
137630: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
137631: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
137632: ,p_ae_header_id => NULL
137633: );
137634:
137635: IF (C_LEVEL_ERROR>= g_log_level) THEN
137658: ----------------------------------------------------------------------------------
137659: -- 4219869 Business Flow
137660: -- Update journal entry status -- Need to generate this within IF
137661: ----------------------------------------------------------------------------------
137662: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
137663: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
137664: ,p_balance_type_code => l_balance_type_code
137665: );
137666:
137745:
137746: --
137747: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
137748: --
137749: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
137750: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
137751: ELSE
137752: ---------------------------------------------------------------------------------------------------
137753: -- 4262811a Switch Sign
137770:
137771: XLA_AE_LINES_PKG.ValidateCurrentLine;
137772: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
137773:
137774: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
137775: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
137776: ,p_balance_type_code => l_balance_type_code);
137777:
137778: END IF;
137943: l_tmp_amt NUMBER;
137944: l_acc_rev_natural_side_code VARCHAR2(1);
137945:
137946: l_num_entries NUMBER;
137947: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137948: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137949: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137950: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137951: l_recog_line_1 NUMBER;
137944: l_acc_rev_natural_side_code VARCHAR2(1);
137945:
137946: l_num_entries NUMBER;
137947: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137948: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137949: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137950: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137951: l_recog_line_1 NUMBER;
137952: l_recog_line_2 NUMBER;
137945:
137946: l_num_entries NUMBER;
137947: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137948: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137949: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137950: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137951: l_recog_line_1 NUMBER;
137952: l_recog_line_2 NUMBER;
137953:
137946: l_num_entries NUMBER;
137947: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
137948: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
137949: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
137950: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
137951: l_recog_line_1 NUMBER;
137952: l_recog_line_2 NUMBER;
137953:
137954: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
137952: l_recog_line_2 NUMBER;
137953:
137954: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
137955: l_bflow_applied_to_amt NUMBER; -- 5132302
137956: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
137957:
137958: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
137959:
137960: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
138027: l_accrual_line_num := NULL; -- 4262811
138028: l_tmp_amt := NULL; -- 4262811
138029: --
138030:
138031: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
138032: l_balance_type_code <> 'B' THEN
138033: IF NVL(p_source_33,'
138034: ') = 'TRV' AND
138035: NVL(p_source_95,'
138101: --
138102: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
138103:
138104: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
138105: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
138106:
138107: -- 4955764
138108: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
138109: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
138225: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
138226:
138227: IF xla_accounting_cache_pkg.GetValueChar
138228: (p_source_code => 'LEDGER_CATEGORY_CODE'
138229: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
138230: AND l_bflow_method_code = 'PRIOR_ENTRY'
138231: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
138232: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
138233: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
138335: p_lookup_type => 'XLA_OWNER_TYPE'
138336: ,p_lookup_code => l_component_type_code
138337: )
138338: ,p_token_4 => 'PRODUCT_NAME'
138339: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
138340: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
138341: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
138342: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
138343: ,p_ae_header_id => NULL
138336: ,p_lookup_code => l_component_type_code
138337: )
138338: ,p_token_4 => 'PRODUCT_NAME'
138339: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
138340: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
138341: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
138342: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
138343: ,p_ae_header_id => NULL
138344: );
138337: )
138338: ,p_token_4 => 'PRODUCT_NAME'
138339: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
138340: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
138341: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
138342: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
138343: ,p_ae_header_id => NULL
138344: );
138345:
138338: ,p_token_4 => 'PRODUCT_NAME'
138339: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
138340: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
138341: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
138342: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
138343: ,p_ae_header_id => NULL
138344: );
138345:
138346: IF (C_LEVEL_ERROR>= g_log_level) THEN
138369: ----------------------------------------------------------------------------------
138370: -- 4219869 Business Flow
138371: -- Update journal entry status -- Need to generate this within IF
138372: ----------------------------------------------------------------------------------
138373: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
138374: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
138375: ,p_balance_type_code => l_balance_type_code
138376: );
138377:
138456:
138457: --
138458: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
138459: --
138460: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
138461: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
138462: ELSE
138463: ---------------------------------------------------------------------------------------------------
138464: -- 4262811a Switch Sign
138481:
138482: XLA_AE_LINES_PKG.ValidateCurrentLine;
138483: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
138484:
138485: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
138486: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
138487: ,p_balance_type_code => l_balance_type_code);
138488:
138489: END IF;
138629: l_tmp_amt NUMBER;
138630: l_acc_rev_natural_side_code VARCHAR2(1);
138631:
138632: l_num_entries NUMBER;
138633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
138634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
138635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
138636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
138637: l_recog_line_1 NUMBER;
138630: l_acc_rev_natural_side_code VARCHAR2(1);
138631:
138632: l_num_entries NUMBER;
138633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
138634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
138635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
138636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
138637: l_recog_line_1 NUMBER;
138638: l_recog_line_2 NUMBER;
138631:
138632: l_num_entries NUMBER;
138633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
138634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
138635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
138636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
138637: l_recog_line_1 NUMBER;
138638: l_recog_line_2 NUMBER;
138639:
138632: l_num_entries NUMBER;
138633: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
138634: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
138635: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
138636: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
138637: l_recog_line_1 NUMBER;
138638: l_recog_line_2 NUMBER;
138639:
138640: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
138638: l_recog_line_2 NUMBER;
138639:
138640: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
138641: l_bflow_applied_to_amt NUMBER; -- 5132302
138642: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
138643:
138644: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
138645:
138646: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
138713: l_accrual_line_num := NULL; -- 4262811
138714: l_tmp_amt := NULL; -- 4262811
138715: --
138716:
138717: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
138718: l_balance_type_code <> 'B' THEN
138719: IF NVL(p_source_96,'
138720: ') = 'CLEAR_CLEAR' AND
138721: NVL(p_source_97,'
138789: --
138790: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
138791:
138792: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
138793: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
138794:
138795: -- 4955764
138796: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
138797: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
138865: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
138866:
138867: IF xla_accounting_cache_pkg.GetValueChar
138868: (p_source_code => 'LEDGER_CATEGORY_CODE'
138869: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
138870: AND l_bflow_method_code = 'PRIOR_ENTRY'
138871: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
138872: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
138873: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
139072: p_lookup_type => 'XLA_OWNER_TYPE'
139073: ,p_lookup_code => l_component_type_code
139074: )
139075: ,p_token_4 => 'PRODUCT_NAME'
139076: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139077: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139078: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139079: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139080: ,p_ae_header_id => NULL
139073: ,p_lookup_code => l_component_type_code
139074: )
139075: ,p_token_4 => 'PRODUCT_NAME'
139076: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139077: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139078: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139079: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139080: ,p_ae_header_id => NULL
139081: );
139074: )
139075: ,p_token_4 => 'PRODUCT_NAME'
139076: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139077: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139078: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139079: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139080: ,p_ae_header_id => NULL
139081: );
139082:
139075: ,p_token_4 => 'PRODUCT_NAME'
139076: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139077: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139078: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139079: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139080: ,p_ae_header_id => NULL
139081: );
139082:
139083: IF (C_LEVEL_ERROR>= g_log_level) THEN
139106: ----------------------------------------------------------------------------------
139107: -- 4219869 Business Flow
139108: -- Update journal entry status -- Need to generate this within IF
139109: ----------------------------------------------------------------------------------
139110: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
139111: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
139112: ,p_balance_type_code => l_balance_type_code
139113: );
139114:
139282:
139283: --
139284: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
139285: --
139286: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
139287: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
139288: ELSE
139289: ---------------------------------------------------------------------------------------------------
139290: -- 4262811a Switch Sign
139307:
139308: XLA_AE_LINES_PKG.ValidateCurrentLine;
139309: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
139310:
139311: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
139312: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
139313: ,p_balance_type_code => l_balance_type_code);
139314:
139315: END IF;
139464: l_tmp_amt NUMBER;
139465: l_acc_rev_natural_side_code VARCHAR2(1);
139466:
139467: l_num_entries NUMBER;
139468: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
139469: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
139470: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
139471: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
139472: l_recog_line_1 NUMBER;
139465: l_acc_rev_natural_side_code VARCHAR2(1);
139466:
139467: l_num_entries NUMBER;
139468: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
139469: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
139470: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
139471: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
139472: l_recog_line_1 NUMBER;
139473: l_recog_line_2 NUMBER;
139466:
139467: l_num_entries NUMBER;
139468: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
139469: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
139470: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
139471: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
139472: l_recog_line_1 NUMBER;
139473: l_recog_line_2 NUMBER;
139474:
139467: l_num_entries NUMBER;
139468: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
139469: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
139470: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
139471: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
139472: l_recog_line_1 NUMBER;
139473: l_recog_line_2 NUMBER;
139474:
139475: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
139473: l_recog_line_2 NUMBER;
139474:
139475: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
139476: l_bflow_applied_to_amt NUMBER; -- 5132302
139477: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
139478:
139479: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
139480:
139481: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
139548: l_accrual_line_num := NULL; -- 4262811
139549: l_tmp_amt := NULL; -- 4262811
139550: --
139551:
139552: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
139553: l_balance_type_code <> 'B' THEN
139554: IF NVL(p_source_96,'
139555: ') <> 'CLEAR_CLEAR' AND
139556: NVL(p_source_97,'
139628: --
139629: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
139630:
139631: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
139632: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
139633:
139634: -- 4955764
139635: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
139636: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
139704: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
139705:
139706: IF xla_accounting_cache_pkg.GetValueChar
139707: (p_source_code => 'LEDGER_CATEGORY_CODE'
139708: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
139709: AND l_bflow_method_code = 'PRIOR_ENTRY'
139710: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
139711: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
139712: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
139911: p_lookup_type => 'XLA_OWNER_TYPE'
139912: ,p_lookup_code => l_component_type_code
139913: )
139914: ,p_token_4 => 'PRODUCT_NAME'
139915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139919: ,p_ae_header_id => NULL
139912: ,p_lookup_code => l_component_type_code
139913: )
139914: ,p_token_4 => 'PRODUCT_NAME'
139915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139919: ,p_ae_header_id => NULL
139920: );
139913: )
139914: ,p_token_4 => 'PRODUCT_NAME'
139915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139919: ,p_ae_header_id => NULL
139920: );
139921:
139914: ,p_token_4 => 'PRODUCT_NAME'
139915: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
139916: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
139917: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
139918: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
139919: ,p_ae_header_id => NULL
139920: );
139921:
139922: IF (C_LEVEL_ERROR>= g_log_level) THEN
139945: ----------------------------------------------------------------------------------
139946: -- 4219869 Business Flow
139947: -- Update journal entry status -- Need to generate this within IF
139948: ----------------------------------------------------------------------------------
139949: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
139950: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
139951: ,p_balance_type_code => l_balance_type_code
139952: );
139953:
140121:
140122: --
140123: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
140124: --
140125: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
140126: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
140127: ELSE
140128: ---------------------------------------------------------------------------------------------------
140129: -- 4262811a Switch Sign
140146:
140147: XLA_AE_LINES_PKG.ValidateCurrentLine;
140148: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
140149:
140150: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
140151: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
140152: ,p_balance_type_code => l_balance_type_code);
140153:
140154: END IF;
140321: l_tmp_amt NUMBER;
140322: l_acc_rev_natural_side_code VARCHAR2(1);
140323:
140324: l_num_entries NUMBER;
140325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
140326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
140327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
140328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
140329: l_recog_line_1 NUMBER;
140322: l_acc_rev_natural_side_code VARCHAR2(1);
140323:
140324: l_num_entries NUMBER;
140325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
140326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
140327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
140328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
140329: l_recog_line_1 NUMBER;
140330: l_recog_line_2 NUMBER;
140323:
140324: l_num_entries NUMBER;
140325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
140326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
140327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
140328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
140329: l_recog_line_1 NUMBER;
140330: l_recog_line_2 NUMBER;
140331:
140324: l_num_entries NUMBER;
140325: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
140326: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
140327: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
140328: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
140329: l_recog_line_1 NUMBER;
140330: l_recog_line_2 NUMBER;
140331:
140332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
140330: l_recog_line_2 NUMBER;
140331:
140332: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
140333: l_bflow_applied_to_amt NUMBER; -- 5132302
140334: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
140335:
140336: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
140337:
140338: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
140405: l_accrual_line_num := NULL; -- 4262811
140406: l_tmp_amt := NULL; -- 4262811
140407: --
140408:
140409: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
140410: l_balance_type_code <> 'B' THEN
140411: IF NVL(p_source_33,'
140412: ') = 'AWT'
140413: THEN
140477: --
140478: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
140479:
140480: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
140481: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
140482:
140483: -- 4955764
140484: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
140485: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
140601: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
140602:
140603: IF xla_accounting_cache_pkg.GetValueChar
140604: (p_source_code => 'LEDGER_CATEGORY_CODE'
140605: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
140606: AND l_bflow_method_code = 'PRIOR_ENTRY'
140607: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
140608: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
140609: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
140800: p_lookup_type => 'XLA_OWNER_TYPE'
140801: ,p_lookup_code => l_component_type_code
140802: )
140803: ,p_token_4 => 'PRODUCT_NAME'
140804: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
140805: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
140806: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
140807: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
140808: ,p_ae_header_id => NULL
140801: ,p_lookup_code => l_component_type_code
140802: )
140803: ,p_token_4 => 'PRODUCT_NAME'
140804: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
140805: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
140806: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
140807: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
140808: ,p_ae_header_id => NULL
140809: );
140802: )
140803: ,p_token_4 => 'PRODUCT_NAME'
140804: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
140805: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
140806: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
140807: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
140808: ,p_ae_header_id => NULL
140809: );
140810:
140803: ,p_token_4 => 'PRODUCT_NAME'
140804: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
140805: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
140806: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
140807: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
140808: ,p_ae_header_id => NULL
140809: );
140810:
140811: IF (C_LEVEL_ERROR>= g_log_level) THEN
140834: ----------------------------------------------------------------------------------
140835: -- 4219869 Business Flow
140836: -- Update journal entry status -- Need to generate this within IF
140837: ----------------------------------------------------------------------------------
140838: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
140839: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
140840: ,p_balance_type_code => l_balance_type_code
140841: );
140842:
141010:
141011: --
141012: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
141013: --
141014: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
141015: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
141016: ELSE
141017: ---------------------------------------------------------------------------------------------------
141018: -- 4262811a Switch Sign
141035:
141036: XLA_AE_LINES_PKG.ValidateCurrentLine;
141037: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
141038:
141039: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
141040: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
141041: ,p_balance_type_code => l_balance_type_code);
141042:
141043: END IF;
141208: l_tmp_amt NUMBER;
141209: l_acc_rev_natural_side_code VARCHAR2(1);
141210:
141211: l_num_entries NUMBER;
141212: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
141213: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
141214: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
141215: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
141216: l_recog_line_1 NUMBER;
141209: l_acc_rev_natural_side_code VARCHAR2(1);
141210:
141211: l_num_entries NUMBER;
141212: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
141213: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
141214: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
141215: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
141216: l_recog_line_1 NUMBER;
141217: l_recog_line_2 NUMBER;
141210:
141211: l_num_entries NUMBER;
141212: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
141213: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
141214: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
141215: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
141216: l_recog_line_1 NUMBER;
141217: l_recog_line_2 NUMBER;
141218:
141211: l_num_entries NUMBER;
141212: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
141213: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
141214: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
141215: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
141216: l_recog_line_1 NUMBER;
141217: l_recog_line_2 NUMBER;
141218:
141219: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
141217: l_recog_line_2 NUMBER;
141218:
141219: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
141220: l_bflow_applied_to_amt NUMBER; -- 5132302
141221: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
141222:
141223: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
141224:
141225: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
141292: l_accrual_line_num := NULL; -- 4262811
141293: l_tmp_amt := NULL; -- 4262811
141294: --
141295:
141296: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
141297: l_balance_type_code <> 'B' THEN
141298: IF NVL(p_source_33,'
141299: ') = 'AWT'
141300: THEN
141364: --
141365: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
141366:
141367: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
141368: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
141369:
141370: -- 4955764
141371: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
141372: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
141486: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
141487:
141488: IF xla_accounting_cache_pkg.GetValueChar
141489: (p_source_code => 'LEDGER_CATEGORY_CODE'
141490: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
141491: AND l_bflow_method_code = 'PRIOR_ENTRY'
141492: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
141493: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
141494: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
141685: p_lookup_type => 'XLA_OWNER_TYPE'
141686: ,p_lookup_code => l_component_type_code
141687: )
141688: ,p_token_4 => 'PRODUCT_NAME'
141689: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
141690: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
141691: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
141692: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
141693: ,p_ae_header_id => NULL
141686: ,p_lookup_code => l_component_type_code
141687: )
141688: ,p_token_4 => 'PRODUCT_NAME'
141689: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
141690: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
141691: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
141692: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
141693: ,p_ae_header_id => NULL
141694: );
141687: )
141688: ,p_token_4 => 'PRODUCT_NAME'
141689: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
141690: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
141691: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
141692: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
141693: ,p_ae_header_id => NULL
141694: );
141695:
141688: ,p_token_4 => 'PRODUCT_NAME'
141689: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
141690: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
141691: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
141692: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
141693: ,p_ae_header_id => NULL
141694: );
141695:
141696: IF (C_LEVEL_ERROR>= g_log_level) THEN
141719: ----------------------------------------------------------------------------------
141720: -- 4219869 Business Flow
141721: -- Update journal entry status -- Need to generate this within IF
141722: ----------------------------------------------------------------------------------
141723: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
141724: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
141725: ,p_balance_type_code => l_balance_type_code
141726: );
141727:
141895:
141896: --
141897: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
141898: --
141899: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
141900: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
141901: ELSE
141902: ---------------------------------------------------------------------------------------------------
141903: -- 4262811a Switch Sign
141920:
141921: XLA_AE_LINES_PKG.ValidateCurrentLine;
141922: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
141923:
141924: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
141925: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
141926: ,p_balance_type_code => l_balance_type_code);
141927:
141928: END IF;
142095: l_tmp_amt NUMBER;
142096: l_acc_rev_natural_side_code VARCHAR2(1);
142097:
142098: l_num_entries NUMBER;
142099: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142100: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142101: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142102: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142103: l_recog_line_1 NUMBER;
142096: l_acc_rev_natural_side_code VARCHAR2(1);
142097:
142098: l_num_entries NUMBER;
142099: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142100: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142101: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142102: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142103: l_recog_line_1 NUMBER;
142104: l_recog_line_2 NUMBER;
142097:
142098: l_num_entries NUMBER;
142099: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142100: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142101: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142102: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142103: l_recog_line_1 NUMBER;
142104: l_recog_line_2 NUMBER;
142105:
142098: l_num_entries NUMBER;
142099: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142100: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142101: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142102: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142103: l_recog_line_1 NUMBER;
142104: l_recog_line_2 NUMBER;
142105:
142106: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
142104: l_recog_line_2 NUMBER;
142105:
142106: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
142107: l_bflow_applied_to_amt NUMBER; -- 5132302
142108: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
142109:
142110: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
142111:
142112: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
142179: l_accrual_line_num := NULL; -- 4262811
142180: l_tmp_amt := NULL; -- 4262811
142181: --
142182:
142183: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
142184: l_balance_type_code <> 'B' THEN
142185: IF NVL(p_source_33,'
142186: ') = 'AWT'
142187: THEN
142251: --
142252: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
142253:
142254: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
142255: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
142256:
142257: -- 4955764
142258: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
142259: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
142377: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
142378:
142379: IF xla_accounting_cache_pkg.GetValueChar
142380: (p_source_code => 'LEDGER_CATEGORY_CODE'
142381: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
142382: AND l_bflow_method_code = 'PRIOR_ENTRY'
142383: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
142384: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
142385: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
142576: p_lookup_type => 'XLA_OWNER_TYPE'
142577: ,p_lookup_code => l_component_type_code
142578: )
142579: ,p_token_4 => 'PRODUCT_NAME'
142580: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
142581: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
142582: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
142583: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
142584: ,p_ae_header_id => NULL
142577: ,p_lookup_code => l_component_type_code
142578: )
142579: ,p_token_4 => 'PRODUCT_NAME'
142580: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
142581: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
142582: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
142583: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
142584: ,p_ae_header_id => NULL
142585: );
142578: )
142579: ,p_token_4 => 'PRODUCT_NAME'
142580: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
142581: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
142582: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
142583: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
142584: ,p_ae_header_id => NULL
142585: );
142586:
142579: ,p_token_4 => 'PRODUCT_NAME'
142580: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
142581: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
142582: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
142583: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
142584: ,p_ae_header_id => NULL
142585: );
142586:
142587: IF (C_LEVEL_ERROR>= g_log_level) THEN
142610: ----------------------------------------------------------------------------------
142611: -- 4219869 Business Flow
142612: -- Update journal entry status -- Need to generate this within IF
142613: ----------------------------------------------------------------------------------
142614: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
142615: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
142616: ,p_balance_type_code => l_balance_type_code
142617: );
142618:
142786:
142787: --
142788: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
142789: --
142790: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
142791: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
142792: ELSE
142793: ---------------------------------------------------------------------------------------------------
142794: -- 4262811a Switch Sign
142811:
142812: XLA_AE_LINES_PKG.ValidateCurrentLine;
142813: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
142814:
142815: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
142816: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
142817: ,p_balance_type_code => l_balance_type_code);
142818:
142819: END IF;
142986: l_tmp_amt NUMBER;
142987: l_acc_rev_natural_side_code VARCHAR2(1);
142988:
142989: l_num_entries NUMBER;
142990: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142991: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142992: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142993: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142994: l_recog_line_1 NUMBER;
142987: l_acc_rev_natural_side_code VARCHAR2(1);
142988:
142989: l_num_entries NUMBER;
142990: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142991: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142992: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142993: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142994: l_recog_line_1 NUMBER;
142995: l_recog_line_2 NUMBER;
142988:
142989: l_num_entries NUMBER;
142990: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142991: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142992: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142993: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142994: l_recog_line_1 NUMBER;
142995: l_recog_line_2 NUMBER;
142996:
142989: l_num_entries NUMBER;
142990: l_gl_dates xla_ae_journal_entry_pkg.t_array_date;
142991: l_accted_amts xla_ae_journal_entry_pkg.t_array_num;
142992: l_entered_amts xla_ae_journal_entry_pkg.t_array_num;
142993: l_period_names xla_ae_journal_entry_pkg.t_array_V15L;
142994: l_recog_line_1 NUMBER;
142995: l_recog_line_2 NUMBER;
142996:
142997: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
142995: l_recog_line_2 NUMBER;
142996:
142997: l_bflow_applied_to_amt_idx NUMBER; -- 5132302
142998: l_bflow_applied_to_amt NUMBER; -- 5132302
142999: l_bflow_applied_to_amts xla_ae_journal_entry_pkg.t_array_num; -- 5132302
143000:
143001: l_event_id NUMBER; -- To handle MPA header Description: xla_ae_header_pkg.SetHdrDescription
143002:
143003: --l_rounding_ccy VARCHAR2(15); -- To handle MPA rounding 4262811b
143070: l_accrual_line_num := NULL; -- 4262811
143071: l_tmp_amt := NULL; -- 4262811
143072: --
143073:
143074: IF XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id = XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id OR
143075: l_balance_type_code <> 'B' THEN
143076: IF NVL(p_source_33,'
143077: ') = 'AWT'
143078: THEN
143142: --
143143: XLA_AE_LINES_PKG.g_rec_lines.array_balance_type_code(XLA_AE_LINES_PKG.g_LineNumber) := l_balance_type_code;
143144:
143145: XLA_AE_LINES_PKG.g_rec_lines.array_ledger_id(XLA_AE_LINES_PKG.g_LineNumber) :=
143146: XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id;
143147:
143148: -- 4955764
143149: XLA_AE_LINES_PKG.g_rec_lines.array_gl_date(XLA_AE_LINES_PKG.g_LineNumber) :=
143150: XLA_AE_HEADER_PKG.g_rec_header_new.array_gl_date(g_array_event(p_event_id).array_value_num('header_index'));
143266: l_enc_upg_option := XLA_AE_LINES_PKG.g_rec_lines.array_enc_upg_option(XLA_AE_LINES_PKG.g_LineNumber);
143267:
143268: IF xla_accounting_cache_pkg.GetValueChar
143269: (p_source_code => 'LEDGER_CATEGORY_CODE'
143270: ,p_target_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id) IN ('PRIMARY','ALC')
143271: AND l_bflow_method_code = 'PRIOR_ENTRY'
143272: -- AND (l_actual_upg_option = 'Y' OR l_enc_upg_option = 'Y') Bug 4922099
143273: AND ( (NVL(l_actual_upg_option, 'N') IN ('Y', 'O')) OR
143274: (NVL(l_enc_upg_option, 'N') IN ('Y', 'O'))
143465: p_lookup_type => 'XLA_OWNER_TYPE'
143466: ,p_lookup_code => l_component_type_code
143467: )
143468: ,p_token_4 => 'PRODUCT_NAME'
143469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
143470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
143471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
143472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
143473: ,p_ae_header_id => NULL
143466: ,p_lookup_code => l_component_type_code
143467: )
143468: ,p_token_4 => 'PRODUCT_NAME'
143469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
143470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
143471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
143472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
143473: ,p_ae_header_id => NULL
143474: );
143467: )
143468: ,p_token_4 => 'PRODUCT_NAME'
143469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
143470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
143471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
143472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
143473: ,p_ae_header_id => NULL
143474: );
143475:
143468: ,p_token_4 => 'PRODUCT_NAME'
143469: ,p_value_4 => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.application_name
143470: ,p_entity_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.entity_id
143471: ,p_event_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.event_id
143472: ,p_ledger_id => XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id
143473: ,p_ae_header_id => NULL
143474: );
143475:
143476: IF (C_LEVEL_ERROR>= g_log_level) THEN
143499: ----------------------------------------------------------------------------------
143500: -- 4219869 Business Flow
143501: -- Update journal entry status -- Need to generate this within IF
143502: ----------------------------------------------------------------------------------
143503: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
143504: (p_hdr_idx => g_array_event(p_event_id).array_value_num('header_index')
143505: ,p_balance_type_code => l_balance_type_code
143506: );
143507:
143675:
143676: --
143677: -- Depending on the Reversal Method setup, do a switch side or changes sign for the amounts
143678: --
143679: IF (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_reversal_option = 'SIDE') THEN
143680: XLA_AE_LINES_PKG.g_rec_lines.array_natural_side_code(XLA_AE_LINES_PKG.g_LineNumber) := l_acc_rev_natural_side_code;
143681: ELSE
143682: ---------------------------------------------------------------------------------------------------
143683: -- 4262811a Switch Sign
143700:
143701: XLA_AE_LINES_PKG.ValidateCurrentLine;
143702: XLA_AE_LINES_PKG.SetDebitCreditAmounts;
143703:
143704: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
143705: (p_hdr_idx => g_array_event(p_event_id).array_value_num('acc_rev_header_index')
143706: ,p_balance_type_code => l_balance_type_code);
143707:
143708: END IF;
144436:
144437: l_calculate_acctd_flag VARCHAR2(1) :='N';
144438: l_calculate_g_l_flag VARCHAR2(1) :='N';
144439: --
144440: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144441: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144437: l_calculate_acctd_flag VARCHAR2(1) :='N';
144438: l_calculate_g_l_flag VARCHAR2(1) :='N';
144439: --
144440: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144441: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144438: l_calculate_g_l_flag VARCHAR2(1) :='N';
144439: --
144440: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144441: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144439: --
144440: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144441: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144440: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144441: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144441: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144442: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144443: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144444: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144445: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144446: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144447: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144448: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144449: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144450: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144451: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144452: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144453: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144454: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144455: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144456: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144464: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144457: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144464: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144465: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144458: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144464: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144465: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144466:
144459: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144464: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144465: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144466:
144467: l_event_id NUMBER;
144460: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144464: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144465: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144466:
144467: l_event_id NUMBER;
144468: l_previous_event_id NUMBER;
144461: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
144462: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
144463: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
144464: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144465: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
144466:
144467: l_event_id NUMBER;
144468: l_previous_event_id NUMBER;
144469: l_first_event_id NUMBER;
144479: l_event_class_name VARCHAR2(80) := 'Credit Memos';
144480: l_description VARCHAR2(4000);
144481: l_transaction_reversal NUMBER;
144482: l_ae_header_id NUMBER;
144483: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
144484: l_log_module VARCHAR2(240);
144485: --
144486: l_acct_reversal_source VARCHAR2(30);
144487: l_trx_reversal_source VARCHAR2(30);
144987:
144988: --
144989: -- set event info as cache for other routines to refer event attributes
144990: --
144991: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
144992: (p_application_id => p_application_id
144993: ,p_primary_ledger_id => p_primary_ledger_id
144994: ,p_base_ledger_id => p_base_ledger_id
144995: ,p_target_ledger_id => p_target_ledger_id
145020:
145021: --
145022: -- set the status of entry to C_VALID (0)
145023: --
145024: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
145025:
145026: --
145027: -- initialize a row for ae header
145028: --
145070: --
145071: -- initilaize the status of ae headers for diffrent balance types
145072: -- the status is initialised to C_NOT_CREATED (2)
145073: --
145074: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145075: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145076: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145077:
145078: --
145071: -- initilaize the status of ae headers for diffrent balance types
145072: -- the status is initialised to C_NOT_CREATED (2)
145073: --
145074: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145075: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145076: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145077:
145078: --
145079: -- call api to validate and store accounting attributes for header
145072: -- the status is initialised to C_NOT_CREATED (2)
145073: --
145074: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145075: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145076: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
145077:
145078: --
145079: -- call api to validate and store accounting attributes for header
145080: --
145131: --
145132: l_trx_reversal_source := SUBSTR(NULL, 1,30);
145133:
145134: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
145135: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
145136:
145137: xla_accounting_err_pkg.build_message
145138: (p_appli_s_name => 'XLA'
145139: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
145139: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
145140: ,p_token_1 => 'ACCT_ATTR_NAME'
145141: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
145142: ,p_token_2 => 'PRODUCT_NAME'
145143: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145144: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145145: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145146: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145147:
145140: ,p_token_1 => 'ACCT_ATTR_NAME'
145141: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
145142: ,p_token_2 => 'PRODUCT_NAME'
145143: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145144: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145145: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145146: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145147:
145148: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
145141: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
145142: ,p_token_2 => 'PRODUCT_NAME'
145143: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145144: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145145: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145146: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145147:
145148: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
145149: --
145142: ,p_token_2 => 'PRODUCT_NAME'
145143: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145144: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145145: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145146: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145147:
145148: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
145149: --
145150: -- following sets the accounting attributes needed to reverse
145161: ----------------------------------------------------------------
145162: -- 4262811 - update the header statuses to invalid in need be
145163: ----------------------------------------------------------------
145164: --
145165: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
145166:
145167:
145168: -----------------------------------------------
145169: -- No accrual reversal for the event class/type
145333: ,p_module => l_log_module);
145334: END IF;
145335:
145336: --
145337: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
145338: --
145339: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
145340: --
145341: -- set event info as cache for other routines to refer event attributes
145335:
145336: --
145337: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
145338: --
145339: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
145340: --
145341: -- set event info as cache for other routines to refer event attributes
145342: --
145343:
145343:
145344: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
145345: l_previous_event_id := l_event_id;
145346:
145347: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
145348: (p_application_id => p_application_id
145349: ,p_primary_ledger_id => p_primary_ledger_id
145350: ,p_base_ledger_id => p_base_ledger_id
145351: ,p_target_ledger_id => p_target_ledger_id
145384: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
145385:
145386: IF l_continue_with_lines THEN
145387: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
145388: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
145389:
145390: xla_accounting_err_pkg.build_message
145391: (p_appli_s_name => 'XLA'
145392: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
145392: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
145393: ,p_token_1 => 'LINE_NUMBER'
145394: ,p_value_1 => l_array_extract_line_num(Idx)
145395: ,p_token_2 => 'PRODUCT_NAME'
145396: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145397: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145398: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145399: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145400:
145393: ,p_token_1 => 'LINE_NUMBER'
145394: ,p_value_1 => l_array_extract_line_num(Idx)
145395: ,p_token_2 => 'PRODUCT_NAME'
145396: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145397: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145398: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145399: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145400:
145401: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
145394: ,p_value_1 => l_array_extract_line_num(Idx)
145395: ,p_token_2 => 'PRODUCT_NAME'
145396: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145397: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145398: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145399: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145400:
145401: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
145402: --
145395: ,p_token_2 => 'PRODUCT_NAME'
145396: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
145397: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
145398: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
145399: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
145400:
145401: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
145402: --
145403: -- following sets the accounting attributes needed to reverse
146927:
146928: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
146929: -- or secondary ledger that has different currency with primary
146930: -- or alc that is calculated by sla
146931: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
146932: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
146933:
146934: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
146935: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
146928: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
146929: -- or secondary ledger that has different currency with primary
146930: -- or alc that is calculated by sla
146931: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
146932: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
146933:
146934: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
146935: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
146936: AND (l_actual_flag = 'A')) THEN
146930: -- or alc that is calculated by sla
146931: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
146932: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
146933:
146934: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
146935: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
146936: AND (l_actual_flag = 'A')) THEN
146937: XLA_AE_LINES_PKG.CreateGainOrLossLines(
146938: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
146931: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
146932: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
146933:
146934: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
146935: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
146936: AND (l_actual_flag = 'A')) THEN
146937: XLA_AE_LINES_PKG.CreateGainOrLossLines(
146938: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
146939: ,p_application_id => p_application_id
146934: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
146935: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
146936: AND (l_actual_flag = 'A')) THEN
146937: XLA_AE_LINES_PKG.CreateGainOrLossLines(
146938: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
146939: ,p_application_id => p_application_id
146940: ,p_amb_context_code => 'DEFAULT'
146941: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
146942: ,p_event_class_code => C_EVENT_CLASS_CODE
146937: XLA_AE_LINES_PKG.CreateGainOrLossLines(
146938: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
146939: ,p_application_id => p_application_id
146940: ,p_amb_context_code => 'DEFAULT'
146941: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
146942: ,p_event_class_code => C_EVENT_CLASS_CODE
146943: ,p_event_type_code => C_EVENT_TYPE_CODE
146944:
146945: ,p_gain_ccid => -1
147745:
147746: l_calculate_acctd_flag VARCHAR2(1) :='N';
147747: l_calculate_g_l_flag VARCHAR2(1) :='N';
147748: --
147749: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147750: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147746: l_calculate_acctd_flag VARCHAR2(1) :='N';
147747: l_calculate_g_l_flag VARCHAR2(1) :='N';
147748: --
147749: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147750: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147747: l_calculate_g_l_flag VARCHAR2(1) :='N';
147748: --
147749: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147750: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147748: --
147749: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147750: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147749: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147750: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147750: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147751: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147752: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147753: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147754: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147755: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147756: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147757: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147758: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147759: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147760: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147761: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147762: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147763: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147764: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147765: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147773: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147766: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147773: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147774: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147767: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147773: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147774: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147775:
147768: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147773: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147774: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147775:
147776: l_event_id NUMBER;
147769: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147773: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147774: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147775:
147776: l_event_id NUMBER;
147777: l_previous_event_id NUMBER;
147770: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
147771: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
147772: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
147773: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147774: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
147775:
147776: l_event_id NUMBER;
147777: l_previous_event_id NUMBER;
147778: l_first_event_id NUMBER;
147788: l_event_class_name VARCHAR2(80) := 'Debit Memos';
147789: l_description VARCHAR2(4000);
147790: l_transaction_reversal NUMBER;
147791: l_ae_header_id NUMBER;
147792: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
147793: l_log_module VARCHAR2(240);
147794: --
147795: l_acct_reversal_source VARCHAR2(30);
147796: l_trx_reversal_source VARCHAR2(30);
148281:
148282: --
148283: -- set event info as cache for other routines to refer event attributes
148284: --
148285: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
148286: (p_application_id => p_application_id
148287: ,p_primary_ledger_id => p_primary_ledger_id
148288: ,p_base_ledger_id => p_base_ledger_id
148289: ,p_target_ledger_id => p_target_ledger_id
148314:
148315: --
148316: -- set the status of entry to C_VALID (0)
148317: --
148318: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
148319:
148320: --
148321: -- initialize a row for ae header
148322: --
148362: --
148363: -- initilaize the status of ae headers for diffrent balance types
148364: -- the status is initialised to C_NOT_CREATED (2)
148365: --
148366: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148367: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148368: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148369:
148370: --
148363: -- initilaize the status of ae headers for diffrent balance types
148364: -- the status is initialised to C_NOT_CREATED (2)
148365: --
148366: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148367: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148368: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148369:
148370: --
148371: -- call api to validate and store accounting attributes for header
148364: -- the status is initialised to C_NOT_CREATED (2)
148365: --
148366: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148367: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148368: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
148369:
148370: --
148371: -- call api to validate and store accounting attributes for header
148372: --
148423: --
148424: l_trx_reversal_source := SUBSTR(NULL, 1,30);
148425:
148426: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
148427: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
148428:
148429: xla_accounting_err_pkg.build_message
148430: (p_appli_s_name => 'XLA'
148431: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
148431: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
148432: ,p_token_1 => 'ACCT_ATTR_NAME'
148433: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
148434: ,p_token_2 => 'PRODUCT_NAME'
148435: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148436: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148437: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148438: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148439:
148432: ,p_token_1 => 'ACCT_ATTR_NAME'
148433: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
148434: ,p_token_2 => 'PRODUCT_NAME'
148435: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148436: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148437: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148438: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148439:
148440: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
148433: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
148434: ,p_token_2 => 'PRODUCT_NAME'
148435: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148436: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148437: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148438: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148439:
148440: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
148441: --
148434: ,p_token_2 => 'PRODUCT_NAME'
148435: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148436: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148437: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148438: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148439:
148440: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
148441: --
148442: -- following sets the accounting attributes needed to reverse
148453: ----------------------------------------------------------------
148454: -- 4262811 - update the header statuses to invalid in need be
148455: ----------------------------------------------------------------
148456: --
148457: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
148458:
148459:
148460: -----------------------------------------------
148461: -- No accrual reversal for the event class/type
148624: ,p_module => l_log_module);
148625: END IF;
148626:
148627: --
148628: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
148629: --
148630: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
148631: --
148632: -- set event info as cache for other routines to refer event attributes
148626:
148627: --
148628: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
148629: --
148630: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
148631: --
148632: -- set event info as cache for other routines to refer event attributes
148633: --
148634:
148634:
148635: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
148636: l_previous_event_id := l_event_id;
148637:
148638: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
148639: (p_application_id => p_application_id
148640: ,p_primary_ledger_id => p_primary_ledger_id
148641: ,p_base_ledger_id => p_base_ledger_id
148642: ,p_target_ledger_id => p_target_ledger_id
148675: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
148676:
148677: IF l_continue_with_lines THEN
148678: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
148679: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
148680:
148681: xla_accounting_err_pkg.build_message
148682: (p_appli_s_name => 'XLA'
148683: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
148683: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
148684: ,p_token_1 => 'LINE_NUMBER'
148685: ,p_value_1 => l_array_extract_line_num(Idx)
148686: ,p_token_2 => 'PRODUCT_NAME'
148687: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148688: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148689: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148690: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148691:
148684: ,p_token_1 => 'LINE_NUMBER'
148685: ,p_value_1 => l_array_extract_line_num(Idx)
148686: ,p_token_2 => 'PRODUCT_NAME'
148687: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148688: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148689: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148690: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148691:
148692: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
148685: ,p_value_1 => l_array_extract_line_num(Idx)
148686: ,p_token_2 => 'PRODUCT_NAME'
148687: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148688: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148689: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148690: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148691:
148692: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
148693: --
148686: ,p_token_2 => 'PRODUCT_NAME'
148687: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
148688: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
148689: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
148690: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
148691:
148692: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
148693: --
148694: -- following sets the accounting attributes needed to reverse
150193:
150194: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
150195: -- or secondary ledger that has different currency with primary
150196: -- or alc that is calculated by sla
150197: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
150198: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
150199:
150200: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
150201: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
150194: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
150195: -- or secondary ledger that has different currency with primary
150196: -- or alc that is calculated by sla
150197: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
150198: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
150199:
150200: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
150201: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
150202: AND (l_actual_flag = 'A')) THEN
150196: -- or alc that is calculated by sla
150197: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
150198: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
150199:
150200: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
150201: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
150202: AND (l_actual_flag = 'A')) THEN
150203: XLA_AE_LINES_PKG.CreateGainOrLossLines(
150204: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
150197: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
150198: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
150199:
150200: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
150201: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
150202: AND (l_actual_flag = 'A')) THEN
150203: XLA_AE_LINES_PKG.CreateGainOrLossLines(
150204: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
150205: ,p_application_id => p_application_id
150200: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
150201: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
150202: AND (l_actual_flag = 'A')) THEN
150203: XLA_AE_LINES_PKG.CreateGainOrLossLines(
150204: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
150205: ,p_application_id => p_application_id
150206: ,p_amb_context_code => 'DEFAULT'
150207: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
150208: ,p_event_class_code => C_EVENT_CLASS_CODE
150203: XLA_AE_LINES_PKG.CreateGainOrLossLines(
150204: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
150205: ,p_application_id => p_application_id
150206: ,p_amb_context_code => 'DEFAULT'
150207: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
150208: ,p_event_class_code => C_EVENT_CLASS_CODE
150209: ,p_event_type_code => C_EVENT_TYPE_CODE
150210:
150211: ,p_gain_ccid => -1
150924:
150925: l_calculate_acctd_flag VARCHAR2(1) :='N';
150926: l_calculate_g_l_flag VARCHAR2(1) :='N';
150927: --
150928: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150929: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150925: l_calculate_acctd_flag VARCHAR2(1) :='N';
150926: l_calculate_g_l_flag VARCHAR2(1) :='N';
150927: --
150928: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150929: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150926: l_calculate_g_l_flag VARCHAR2(1) :='N';
150927: --
150928: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150929: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150927: --
150928: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150929: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150928: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150929: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150929: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150930: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150931: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150932: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150933: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150934: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150935: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150936: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150937: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150938: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150939: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150940: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150941: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150942: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150943: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150944: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150952: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150945: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150952: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150953: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150946: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150952: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150953: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150954:
150947: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150952: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150953: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150954:
150955: l_event_id NUMBER;
150948: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150952: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150953: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150954:
150955: l_event_id NUMBER;
150956: l_previous_event_id NUMBER;
150949: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
150950: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
150951: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
150952: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150953: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
150954:
150955: l_event_id NUMBER;
150956: l_previous_event_id NUMBER;
150957: l_first_event_id NUMBER;
150967: l_event_class_name VARCHAR2(80) := 'Future Dated Payments';
150968: l_description VARCHAR2(4000);
150969: l_transaction_reversal NUMBER;
150970: l_ae_header_id NUMBER;
150971: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
150972: l_log_module VARCHAR2(240);
150973: --
150974: l_acct_reversal_source VARCHAR2(30);
150975: l_trx_reversal_source VARCHAR2(30);
151413:
151414: --
151415: -- set event info as cache for other routines to refer event attributes
151416: --
151417: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
151418: (p_application_id => p_application_id
151419: ,p_primary_ledger_id => p_primary_ledger_id
151420: ,p_base_ledger_id => p_base_ledger_id
151421: ,p_target_ledger_id => p_target_ledger_id
151446:
151447: --
151448: -- set the status of entry to C_VALID (0)
151449: --
151450: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
151451:
151452: --
151453: -- initialize a row for ae header
151454: --
151500: --
151501: -- initilaize the status of ae headers for diffrent balance types
151502: -- the status is initialised to C_NOT_CREATED (2)
151503: --
151504: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151505: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151506: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151507:
151508: --
151501: -- initilaize the status of ae headers for diffrent balance types
151502: -- the status is initialised to C_NOT_CREATED (2)
151503: --
151504: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151505: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151506: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151507:
151508: --
151509: -- call api to validate and store accounting attributes for header
151502: -- the status is initialised to C_NOT_CREATED (2)
151503: --
151504: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151505: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151506: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
151507:
151508: --
151509: -- call api to validate and store accounting attributes for header
151510: --
151561: --
151562: l_trx_reversal_source := SUBSTR(NULL, 1,30);
151563:
151564: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
151565: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
151566:
151567: xla_accounting_err_pkg.build_message
151568: (p_appli_s_name => 'XLA'
151569: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
151569: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
151570: ,p_token_1 => 'ACCT_ATTR_NAME'
151571: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
151572: ,p_token_2 => 'PRODUCT_NAME'
151573: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151574: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151575: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151576: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151577:
151570: ,p_token_1 => 'ACCT_ATTR_NAME'
151571: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
151572: ,p_token_2 => 'PRODUCT_NAME'
151573: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151574: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151575: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151576: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151577:
151578: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
151571: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
151572: ,p_token_2 => 'PRODUCT_NAME'
151573: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151574: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151575: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151576: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151577:
151578: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
151579: --
151572: ,p_token_2 => 'PRODUCT_NAME'
151573: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151574: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151575: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151576: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151577:
151578: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
151579: --
151580: -- following sets the accounting attributes needed to reverse
151591: ----------------------------------------------------------------
151592: -- 4262811 - update the header statuses to invalid in need be
151593: ----------------------------------------------------------------
151594: --
151595: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
151596:
151597:
151598: -----------------------------------------------
151599: -- No accrual reversal for the event class/type
151739: ,p_module => l_log_module);
151740: END IF;
151741:
151742: --
151743: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
151744: --
151745: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
151746: --
151747: -- set event info as cache for other routines to refer event attributes
151741:
151742: --
151743: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
151744: --
151745: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
151746: --
151747: -- set event info as cache for other routines to refer event attributes
151748: --
151749:
151749:
151750: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
151751: l_previous_event_id := l_event_id;
151752:
151753: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
151754: (p_application_id => p_application_id
151755: ,p_primary_ledger_id => p_primary_ledger_id
151756: ,p_base_ledger_id => p_base_ledger_id
151757: ,p_target_ledger_id => p_target_ledger_id
151790: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
151791:
151792: IF l_continue_with_lines THEN
151793: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
151794: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
151795:
151796: xla_accounting_err_pkg.build_message
151797: (p_appli_s_name => 'XLA'
151798: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
151798: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
151799: ,p_token_1 => 'LINE_NUMBER'
151800: ,p_value_1 => l_array_extract_line_num(Idx)
151801: ,p_token_2 => 'PRODUCT_NAME'
151802: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151803: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151804: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151805: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151806:
151799: ,p_token_1 => 'LINE_NUMBER'
151800: ,p_value_1 => l_array_extract_line_num(Idx)
151801: ,p_token_2 => 'PRODUCT_NAME'
151802: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151803: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151804: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151805: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151806:
151807: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
151800: ,p_value_1 => l_array_extract_line_num(Idx)
151801: ,p_token_2 => 'PRODUCT_NAME'
151802: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151803: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151804: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151805: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151806:
151807: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
151808: --
151801: ,p_token_2 => 'PRODUCT_NAME'
151802: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
151803: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
151804: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
151805: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
151806:
151807: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
151808: --
151809: -- following sets the accounting attributes needed to reverse
152591:
152592: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
152593: -- or secondary ledger that has different currency with primary
152594: -- or alc that is calculated by sla
152595: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
152596: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
152597:
152598: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
152599: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
152592: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
152593: -- or secondary ledger that has different currency with primary
152594: -- or alc that is calculated by sla
152595: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
152596: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
152597:
152598: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
152599: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
152600: AND (l_actual_flag = 'A')) THEN
152594: -- or alc that is calculated by sla
152595: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
152596: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
152597:
152598: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
152599: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
152600: AND (l_actual_flag = 'A')) THEN
152601: XLA_AE_LINES_PKG.CreateGainOrLossLines(
152602: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
152595: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
152596: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
152597:
152598: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
152599: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
152600: AND (l_actual_flag = 'A')) THEN
152601: XLA_AE_LINES_PKG.CreateGainOrLossLines(
152602: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
152603: ,p_application_id => p_application_id
152598: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
152599: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
152600: AND (l_actual_flag = 'A')) THEN
152601: XLA_AE_LINES_PKG.CreateGainOrLossLines(
152602: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
152603: ,p_application_id => p_application_id
152604: ,p_amb_context_code => 'DEFAULT'
152605: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
152606: ,p_event_class_code => C_EVENT_CLASS_CODE
152601: XLA_AE_LINES_PKG.CreateGainOrLossLines(
152602: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
152603: ,p_application_id => p_application_id
152604: ,p_amb_context_code => 'DEFAULT'
152605: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
152606: ,p_event_class_code => C_EVENT_CLASS_CODE
152607: ,p_event_type_code => C_EVENT_TYPE_CODE
152608:
152609: ,p_gain_ccid => -1
153435:
153436: l_calculate_acctd_flag VARCHAR2(1) :='N';
153437: l_calculate_g_l_flag VARCHAR2(1) :='N';
153438: --
153439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153436: l_calculate_acctd_flag VARCHAR2(1) :='N';
153437: l_calculate_g_l_flag VARCHAR2(1) :='N';
153438: --
153439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153437: l_calculate_g_l_flag VARCHAR2(1) :='N';
153438: --
153439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153438: --
153439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153439: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153440: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153441: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153442: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153443: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153444: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153445: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153446: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153447: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153448: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153449: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153450: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153451: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153452: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153453: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153454: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153455: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153456: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153457: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153465:
153458: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153465:
153466: l_event_id NUMBER;
153459: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153465:
153466: l_event_id NUMBER;
153467: l_previous_event_id NUMBER;
153460: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
153461: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
153462: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
153463: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153464: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
153465:
153466: l_event_id NUMBER;
153467: l_previous_event_id NUMBER;
153468: l_first_event_id NUMBER;
153478: l_event_class_name VARCHAR2(80) := 'Invoices';
153479: l_description VARCHAR2(4000);
153480: l_transaction_reversal NUMBER;
153481: l_ae_header_id NUMBER;
153482: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
153483: l_log_module VARCHAR2(240);
153484: --
153485: l_acct_reversal_source VARCHAR2(30);
153486: l_trx_reversal_source VARCHAR2(30);
153992:
153993: --
153994: -- set event info as cache for other routines to refer event attributes
153995: --
153996: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
153997: (p_application_id => p_application_id
153998: ,p_primary_ledger_id => p_primary_ledger_id
153999: ,p_base_ledger_id => p_base_ledger_id
154000: ,p_target_ledger_id => p_target_ledger_id
154025:
154026: --
154027: -- set the status of entry to C_VALID (0)
154028: --
154029: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
154030:
154031: --
154032: -- initialize a row for ae header
154033: --
154075: --
154076: -- initilaize the status of ae headers for diffrent balance types
154077: -- the status is initialised to C_NOT_CREATED (2)
154078: --
154079: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154080: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154081: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154082:
154083: --
154076: -- initilaize the status of ae headers for diffrent balance types
154077: -- the status is initialised to C_NOT_CREATED (2)
154078: --
154079: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154080: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154081: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154082:
154083: --
154084: -- call api to validate and store accounting attributes for header
154077: -- the status is initialised to C_NOT_CREATED (2)
154078: --
154079: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154080: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154081: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
154082:
154083: --
154084: -- call api to validate and store accounting attributes for header
154085: --
154136: --
154137: l_trx_reversal_source := SUBSTR(NULL, 1,30);
154138:
154139: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
154140: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
154141:
154142: xla_accounting_err_pkg.build_message
154143: (p_appli_s_name => 'XLA'
154144: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
154144: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
154145: ,p_token_1 => 'ACCT_ATTR_NAME'
154146: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
154147: ,p_token_2 => 'PRODUCT_NAME'
154148: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154149: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154150: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154151: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154152:
154145: ,p_token_1 => 'ACCT_ATTR_NAME'
154146: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
154147: ,p_token_2 => 'PRODUCT_NAME'
154148: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154149: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154150: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154151: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154152:
154153: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
154146: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
154147: ,p_token_2 => 'PRODUCT_NAME'
154148: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154149: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154150: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154151: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154152:
154153: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
154154: --
154147: ,p_token_2 => 'PRODUCT_NAME'
154148: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154149: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154150: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154151: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154152:
154153: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
154154: --
154155: -- following sets the accounting attributes needed to reverse
154166: ----------------------------------------------------------------
154167: -- 4262811 - update the header statuses to invalid in need be
154168: ----------------------------------------------------------------
154169: --
154170: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
154171:
154172:
154173: -----------------------------------------------
154174: -- No accrual reversal for the event class/type
154340: ,p_module => l_log_module);
154341: END IF;
154342:
154343: --
154344: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
154345: --
154346: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
154347: --
154348: -- set event info as cache for other routines to refer event attributes
154342:
154343: --
154344: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
154345: --
154346: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
154347: --
154348: -- set event info as cache for other routines to refer event attributes
154349: --
154350:
154350:
154351: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
154352: l_previous_event_id := l_event_id;
154353:
154354: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
154355: (p_application_id => p_application_id
154356: ,p_primary_ledger_id => p_primary_ledger_id
154357: ,p_base_ledger_id => p_base_ledger_id
154358: ,p_target_ledger_id => p_target_ledger_id
154391: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
154392:
154393: IF l_continue_with_lines THEN
154394: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
154395: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
154396:
154397: xla_accounting_err_pkg.build_message
154398: (p_appli_s_name => 'XLA'
154399: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
154399: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
154400: ,p_token_1 => 'LINE_NUMBER'
154401: ,p_value_1 => l_array_extract_line_num(Idx)
154402: ,p_token_2 => 'PRODUCT_NAME'
154403: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154404: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154405: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154406: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154407:
154400: ,p_token_1 => 'LINE_NUMBER'
154401: ,p_value_1 => l_array_extract_line_num(Idx)
154402: ,p_token_2 => 'PRODUCT_NAME'
154403: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154404: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154405: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154406: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154407:
154408: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
154401: ,p_value_1 => l_array_extract_line_num(Idx)
154402: ,p_token_2 => 'PRODUCT_NAME'
154403: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154404: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154405: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154406: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154407:
154408: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
154409: --
154402: ,p_token_2 => 'PRODUCT_NAME'
154403: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
154404: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
154405: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
154406: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
154407:
154408: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
154409: --
154410: -- following sets the accounting attributes needed to reverse
155998:
155999: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
156000: -- or secondary ledger that has different currency with primary
156001: -- or alc that is calculated by sla
156002: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
156003: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
156004:
156005: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
156006: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
155999: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
156000: -- or secondary ledger that has different currency with primary
156001: -- or alc that is calculated by sla
156002: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
156003: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
156004:
156005: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
156006: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
156007: AND (l_actual_flag = 'A')) THEN
156001: -- or alc that is calculated by sla
156002: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
156003: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
156004:
156005: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
156006: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
156007: AND (l_actual_flag = 'A')) THEN
156008: XLA_AE_LINES_PKG.CreateGainOrLossLines(
156009: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
156002: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
156003: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
156004:
156005: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
156006: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
156007: AND (l_actual_flag = 'A')) THEN
156008: XLA_AE_LINES_PKG.CreateGainOrLossLines(
156009: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
156010: ,p_application_id => p_application_id
156005: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
156006: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
156007: AND (l_actual_flag = 'A')) THEN
156008: XLA_AE_LINES_PKG.CreateGainOrLossLines(
156009: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
156010: ,p_application_id => p_application_id
156011: ,p_amb_context_code => 'DEFAULT'
156012: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
156013: ,p_event_class_code => C_EVENT_CLASS_CODE
156008: XLA_AE_LINES_PKG.CreateGainOrLossLines(
156009: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
156010: ,p_application_id => p_application_id
156011: ,p_amb_context_code => 'DEFAULT'
156012: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
156013: ,p_event_class_code => C_EVENT_CLASS_CODE
156014: ,p_event_type_code => C_EVENT_TYPE_CODE
156015:
156016: ,p_gain_ccid => -1
156871:
156872: l_calculate_acctd_flag VARCHAR2(1) :='N';
156873: l_calculate_g_l_flag VARCHAR2(1) :='N';
156874: --
156875: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156876: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156872: l_calculate_acctd_flag VARCHAR2(1) :='N';
156873: l_calculate_g_l_flag VARCHAR2(1) :='N';
156874: --
156875: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156876: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156873: l_calculate_g_l_flag VARCHAR2(1) :='N';
156874: --
156875: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156876: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156874: --
156875: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156876: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156875: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156876: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156876: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156877: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156878: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156879: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156880: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156881: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156882: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156883: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156884: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156885: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156886: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156887: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156888: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156889: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156890: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156891: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156899: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156892: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156899: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156900: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156893: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156899: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156900: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156901:
156894: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156899: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156900: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156901:
156902: l_event_id NUMBER;
156895: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156899: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156900: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156901:
156902: l_event_id NUMBER;
156903: l_previous_event_id NUMBER;
156896: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
156897: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
156898: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
156899: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156900: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
156901:
156902: l_event_id NUMBER;
156903: l_previous_event_id NUMBER;
156904: l_first_event_id NUMBER;
156914: l_event_class_name VARCHAR2(80) := 'Payments';
156915: l_description VARCHAR2(4000);
156916: l_transaction_reversal NUMBER;
156917: l_ae_header_id NUMBER;
156918: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
156919: l_log_module VARCHAR2(240);
156920: --
156921: l_acct_reversal_source VARCHAR2(30);
156922: l_trx_reversal_source VARCHAR2(30);
157482:
157483: --
157484: -- set event info as cache for other routines to refer event attributes
157485: --
157486: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
157487: (p_application_id => p_application_id
157488: ,p_primary_ledger_id => p_primary_ledger_id
157489: ,p_base_ledger_id => p_base_ledger_id
157490: ,p_target_ledger_id => p_target_ledger_id
157515:
157516: --
157517: -- set the status of entry to C_VALID (0)
157518: --
157519: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
157520:
157521: --
157522: -- initialize a row for ae header
157523: --
157585: --
157586: -- initilaize the status of ae headers for diffrent balance types
157587: -- the status is initialised to C_NOT_CREATED (2)
157588: --
157589: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157590: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157591: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157592:
157593: --
157586: -- initilaize the status of ae headers for diffrent balance types
157587: -- the status is initialised to C_NOT_CREATED (2)
157588: --
157589: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157590: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157591: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157592:
157593: --
157594: -- call api to validate and store accounting attributes for header
157587: -- the status is initialised to C_NOT_CREATED (2)
157588: --
157589: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157590: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157591: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
157592:
157593: --
157594: -- call api to validate and store accounting attributes for header
157595: --
157648: --
157649: l_trx_reversal_source := SUBSTR(g_array_event(l_event_id).array_value_char('source_172'), 1,30);
157650:
157651: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
157652: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
157653:
157654: xla_accounting_err_pkg.build_message
157655: (p_appli_s_name => 'XLA'
157656: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
157656: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
157657: ,p_token_1 => 'ACCT_ATTR_NAME'
157658: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
157659: ,p_token_2 => 'PRODUCT_NAME'
157660: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157661: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157662: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157663: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157664:
157657: ,p_token_1 => 'ACCT_ATTR_NAME'
157658: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
157659: ,p_token_2 => 'PRODUCT_NAME'
157660: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157661: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157662: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157663: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157664:
157665: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
157658: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
157659: ,p_token_2 => 'PRODUCT_NAME'
157660: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157661: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157662: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157663: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157664:
157665: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
157666: --
157659: ,p_token_2 => 'PRODUCT_NAME'
157660: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157661: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157662: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157663: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157664:
157665: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
157666: --
157667: -- following sets the accounting attributes needed to reverse
157678: ----------------------------------------------------------------
157679: -- 4262811 - update the header statuses to invalid in need be
157680: ----------------------------------------------------------------
157681: --
157682: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
157683:
157684:
157685: -----------------------------------------------
157686: -- No accrual reversal for the event class/type
157837: ,p_module => l_log_module);
157838: END IF;
157839:
157840: --
157841: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
157842: --
157843: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
157844: --
157845: -- set event info as cache for other routines to refer event attributes
157839:
157840: --
157841: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
157842: --
157843: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
157844: --
157845: -- set event info as cache for other routines to refer event attributes
157846: --
157847:
157847:
157848: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
157849: l_previous_event_id := l_event_id;
157850:
157851: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
157852: (p_application_id => p_application_id
157853: ,p_primary_ledger_id => p_primary_ledger_id
157854: ,p_base_ledger_id => p_base_ledger_id
157855: ,p_target_ledger_id => p_target_ledger_id
157888: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
157889:
157890: IF l_continue_with_lines THEN
157891: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
157892: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
157893:
157894: xla_accounting_err_pkg.build_message
157895: (p_appli_s_name => 'XLA'
157896: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
157896: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
157897: ,p_token_1 => 'LINE_NUMBER'
157898: ,p_value_1 => l_array_extract_line_num(Idx)
157899: ,p_token_2 => 'PRODUCT_NAME'
157900: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157901: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157902: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157903: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157904:
157897: ,p_token_1 => 'LINE_NUMBER'
157898: ,p_value_1 => l_array_extract_line_num(Idx)
157899: ,p_token_2 => 'PRODUCT_NAME'
157900: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157901: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157902: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157903: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157904:
157905: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
157898: ,p_value_1 => l_array_extract_line_num(Idx)
157899: ,p_token_2 => 'PRODUCT_NAME'
157900: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157901: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157902: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157903: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157904:
157905: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
157906: --
157899: ,p_token_2 => 'PRODUCT_NAME'
157900: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
157901: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
157902: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
157903: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
157904:
157905: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
157906: --
157907: -- following sets the accounting attributes needed to reverse
159131:
159132: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
159133: -- or secondary ledger that has different currency with primary
159134: -- or alc that is calculated by sla
159135: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
159136: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
159137:
159138: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
159139: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
159132: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
159133: -- or secondary ledger that has different currency with primary
159134: -- or alc that is calculated by sla
159135: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
159136: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
159137:
159138: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
159139: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
159140: AND (l_actual_flag = 'A')) THEN
159134: -- or alc that is calculated by sla
159135: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
159136: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
159137:
159138: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
159139: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
159140: AND (l_actual_flag = 'A')) THEN
159141: XLA_AE_LINES_PKG.CreateGainOrLossLines(
159142: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
159135: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
159136: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
159137:
159138: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
159139: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
159140: AND (l_actual_flag = 'A')) THEN
159141: XLA_AE_LINES_PKG.CreateGainOrLossLines(
159142: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
159143: ,p_application_id => p_application_id
159138: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
159139: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
159140: AND (l_actual_flag = 'A')) THEN
159141: XLA_AE_LINES_PKG.CreateGainOrLossLines(
159142: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
159143: ,p_application_id => p_application_id
159144: ,p_amb_context_code => 'DEFAULT'
159145: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
159146: ,p_event_class_code => C_EVENT_CLASS_CODE
159141: XLA_AE_LINES_PKG.CreateGainOrLossLines(
159142: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
159143: ,p_application_id => p_application_id
159144: ,p_amb_context_code => 'DEFAULT'
159145: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
159146: ,p_event_class_code => C_EVENT_CLASS_CODE
159147: ,p_event_type_code => C_EVENT_TYPE_CODE
159148:
159149: ,p_gain_ccid => -1
159891:
159892: l_calculate_acctd_flag VARCHAR2(1) :='N';
159893: l_calculate_g_l_flag VARCHAR2(1) :='N';
159894: --
159895: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159896: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159892: l_calculate_acctd_flag VARCHAR2(1) :='N';
159893: l_calculate_g_l_flag VARCHAR2(1) :='N';
159894: --
159895: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159896: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159893: l_calculate_g_l_flag VARCHAR2(1) :='N';
159894: --
159895: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159896: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159894: --
159895: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159896: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159895: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159896: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159896: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159897: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159898: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159899: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159900: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159901: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159902: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159903: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159904: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159905: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159906: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159907: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159908: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159909: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159910: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159911: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159919: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159912: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159919: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159920: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159913: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159919: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159920: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159921:
159914: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159919: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159920: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159921:
159922: l_event_id NUMBER;
159915: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159919: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159920: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159921:
159922: l_event_id NUMBER;
159923: l_previous_event_id NUMBER;
159916: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
159917: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
159918: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
159919: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159920: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
159921:
159922: l_event_id NUMBER;
159923: l_previous_event_id NUMBER;
159924: l_first_event_id NUMBER;
159934: l_event_class_name VARCHAR2(80) := 'Prepayment Applications';
159935: l_description VARCHAR2(4000);
159936: l_transaction_reversal NUMBER;
159937: l_ae_header_id NUMBER;
159938: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
159939: l_log_module VARCHAR2(240);
159940: --
159941: l_acct_reversal_source VARCHAR2(30);
159942: l_trx_reversal_source VARCHAR2(30);
160375:
160376: --
160377: -- set event info as cache for other routines to refer event attributes
160378: --
160379: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
160380: (p_application_id => p_application_id
160381: ,p_primary_ledger_id => p_primary_ledger_id
160382: ,p_base_ledger_id => p_base_ledger_id
160383: ,p_target_ledger_id => p_target_ledger_id
160408:
160409: --
160410: -- set the status of entry to C_VALID (0)
160411: --
160412: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
160413:
160414: --
160415: -- initialize a row for ae header
160416: --
160449: --
160450: -- initilaize the status of ae headers for diffrent balance types
160451: -- the status is initialised to C_NOT_CREATED (2)
160452: --
160453: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160454: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160455: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160456:
160457: --
160450: -- initilaize the status of ae headers for diffrent balance types
160451: -- the status is initialised to C_NOT_CREATED (2)
160452: --
160453: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160454: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160455: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160456:
160457: --
160458: -- call api to validate and store accounting attributes for header
160451: -- the status is initialised to C_NOT_CREATED (2)
160452: --
160453: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160454: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160455: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
160456:
160457: --
160458: -- call api to validate and store accounting attributes for header
160459: --
160496: --
160497: l_trx_reversal_source := SUBSTR(NULL, 1,30);
160498:
160499: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
160500: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
160501:
160502: xla_accounting_err_pkg.build_message
160503: (p_appli_s_name => 'XLA'
160504: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
160504: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
160505: ,p_token_1 => 'ACCT_ATTR_NAME'
160506: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
160507: ,p_token_2 => 'PRODUCT_NAME'
160508: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160509: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160510: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160511: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160512:
160505: ,p_token_1 => 'ACCT_ATTR_NAME'
160506: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
160507: ,p_token_2 => 'PRODUCT_NAME'
160508: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160509: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160510: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160511: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160512:
160513: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
160506: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
160507: ,p_token_2 => 'PRODUCT_NAME'
160508: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160509: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160510: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160511: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160512:
160513: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
160514: --
160507: ,p_token_2 => 'PRODUCT_NAME'
160508: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160509: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160510: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160511: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160512:
160513: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
160514: --
160515: -- following sets the accounting attributes needed to reverse
160526: ----------------------------------------------------------------
160527: -- 4262811 - update the header statuses to invalid in need be
160528: ----------------------------------------------------------------
160529: --
160530: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
160531:
160532:
160533: -----------------------------------------------
160534: -- No accrual reversal for the event class/type
160693: ,p_module => l_log_module);
160694: END IF;
160695:
160696: --
160697: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
160698: --
160699: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
160700: --
160701: -- set event info as cache for other routines to refer event attributes
160695:
160696: --
160697: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
160698: --
160699: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
160700: --
160701: -- set event info as cache for other routines to refer event attributes
160702: --
160703:
160703:
160704: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
160705: l_previous_event_id := l_event_id;
160706:
160707: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
160708: (p_application_id => p_application_id
160709: ,p_primary_ledger_id => p_primary_ledger_id
160710: ,p_base_ledger_id => p_base_ledger_id
160711: ,p_target_ledger_id => p_target_ledger_id
160744: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
160745:
160746: IF l_continue_with_lines THEN
160747: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
160748: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
160749:
160750: xla_accounting_err_pkg.build_message
160751: (p_appli_s_name => 'XLA'
160752: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
160752: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
160753: ,p_token_1 => 'LINE_NUMBER'
160754: ,p_value_1 => l_array_extract_line_num(Idx)
160755: ,p_token_2 => 'PRODUCT_NAME'
160756: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160757: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160758: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160759: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160760:
160753: ,p_token_1 => 'LINE_NUMBER'
160754: ,p_value_1 => l_array_extract_line_num(Idx)
160755: ,p_token_2 => 'PRODUCT_NAME'
160756: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160757: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160758: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160759: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160760:
160761: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
160754: ,p_value_1 => l_array_extract_line_num(Idx)
160755: ,p_token_2 => 'PRODUCT_NAME'
160756: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160757: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160758: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160759: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160760:
160761: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
160762: --
160755: ,p_token_2 => 'PRODUCT_NAME'
160756: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
160757: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
160758: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
160759: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
160760:
160761: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
160762: --
160763: -- following sets the accounting attributes needed to reverse
161418:
161419: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
161420: -- or secondary ledger that has different currency with primary
161421: -- or alc that is calculated by sla
161422: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
161423: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
161424:
161425: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
161426: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
161419: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
161420: -- or secondary ledger that has different currency with primary
161421: -- or alc that is calculated by sla
161422: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
161423: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
161424:
161425: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
161426: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
161427: AND (l_actual_flag = 'A')) THEN
161421: -- or alc that is calculated by sla
161422: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
161423: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
161424:
161425: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
161426: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
161427: AND (l_actual_flag = 'A')) THEN
161428: XLA_AE_LINES_PKG.CreateGainOrLossLines(
161429: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
161422: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
161423: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
161424:
161425: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
161426: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
161427: AND (l_actual_flag = 'A')) THEN
161428: XLA_AE_LINES_PKG.CreateGainOrLossLines(
161429: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
161430: ,p_application_id => p_application_id
161425: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
161426: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
161427: AND (l_actual_flag = 'A')) THEN
161428: XLA_AE_LINES_PKG.CreateGainOrLossLines(
161429: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
161430: ,p_application_id => p_application_id
161431: ,p_amb_context_code => 'DEFAULT'
161432: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
161433: ,p_event_class_code => C_EVENT_CLASS_CODE
161428: XLA_AE_LINES_PKG.CreateGainOrLossLines(
161429: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
161430: ,p_application_id => p_application_id
161431: ,p_amb_context_code => 'DEFAULT'
161432: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
161433: ,p_event_class_code => C_EVENT_CLASS_CODE
161434: ,p_event_type_code => C_EVENT_TYPE_CODE
161435:
161436: ,p_gain_ccid => -1
162238:
162239: l_calculate_acctd_flag VARCHAR2(1) :='N';
162240: l_calculate_g_l_flag VARCHAR2(1) :='N';
162241: --
162242: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162243: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162239: l_calculate_acctd_flag VARCHAR2(1) :='N';
162240: l_calculate_g_l_flag VARCHAR2(1) :='N';
162241: --
162242: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162243: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162240: l_calculate_g_l_flag VARCHAR2(1) :='N';
162241: --
162242: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162243: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162241: --
162242: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162243: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162242: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162243: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162243: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162244: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162245: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162246: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162247: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162248: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162249: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162250: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162251: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162252: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162253: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162254: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162255: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162256: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162257: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162258: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162266: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162259: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162266: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162267: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162260: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162266: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162267: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162268:
162261: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162266: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162267: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162268:
162269: l_event_id NUMBER;
162262: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162266: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162267: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162268:
162269: l_event_id NUMBER;
162270: l_previous_event_id NUMBER;
162263: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
162264: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
162265: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
162266: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162267: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
162268:
162269: l_event_id NUMBER;
162270: l_previous_event_id NUMBER;
162271: l_first_event_id NUMBER;
162281: l_event_class_name VARCHAR2(80) := 'Prepayments';
162282: l_description VARCHAR2(4000);
162283: l_transaction_reversal NUMBER;
162284: l_ae_header_id NUMBER;
162285: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
162286: l_log_module VARCHAR2(240);
162287: --
162288: l_acct_reversal_source VARCHAR2(30);
162289: l_trx_reversal_source VARCHAR2(30);
162783:
162784: --
162785: -- set event info as cache for other routines to refer event attributes
162786: --
162787: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
162788: (p_application_id => p_application_id
162789: ,p_primary_ledger_id => p_primary_ledger_id
162790: ,p_base_ledger_id => p_base_ledger_id
162791: ,p_target_ledger_id => p_target_ledger_id
162816:
162817: --
162818: -- set the status of entry to C_VALID (0)
162819: --
162820: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
162821:
162822: --
162823: -- initialize a row for ae header
162824: --
162865: --
162866: -- initilaize the status of ae headers for diffrent balance types
162867: -- the status is initialised to C_NOT_CREATED (2)
162868: --
162869: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162870: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162871: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162872:
162873: --
162866: -- initilaize the status of ae headers for diffrent balance types
162867: -- the status is initialised to C_NOT_CREATED (2)
162868: --
162869: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162870: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162871: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162872:
162873: --
162874: -- call api to validate and store accounting attributes for header
162867: -- the status is initialised to C_NOT_CREATED (2)
162868: --
162869: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162870: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162871: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
162872:
162873: --
162874: -- call api to validate and store accounting attributes for header
162875: --
162926: --
162927: l_trx_reversal_source := SUBSTR(NULL, 1,30);
162928:
162929: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
162930: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
162931:
162932: xla_accounting_err_pkg.build_message
162933: (p_appli_s_name => 'XLA'
162934: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
162934: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
162935: ,p_token_1 => 'ACCT_ATTR_NAME'
162936: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
162937: ,p_token_2 => 'PRODUCT_NAME'
162938: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
162939: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
162940: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
162941: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
162942:
162935: ,p_token_1 => 'ACCT_ATTR_NAME'
162936: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
162937: ,p_token_2 => 'PRODUCT_NAME'
162938: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
162939: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
162940: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
162941: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
162942:
162943: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
162936: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
162937: ,p_token_2 => 'PRODUCT_NAME'
162938: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
162939: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
162940: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
162941: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
162942:
162943: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
162944: --
162937: ,p_token_2 => 'PRODUCT_NAME'
162938: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
162939: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
162940: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
162941: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
162942:
162943: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
162944: --
162945: -- following sets the accounting attributes needed to reverse
162956: ----------------------------------------------------------------
162957: -- 4262811 - update the header statuses to invalid in need be
162958: ----------------------------------------------------------------
162959: --
162960: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
162961:
162962:
162963: -----------------------------------------------
162964: -- No accrual reversal for the event class/type
163126: ,p_module => l_log_module);
163127: END IF;
163128:
163129: --
163130: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
163131: --
163132: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
163133: --
163134: -- set event info as cache for other routines to refer event attributes
163128:
163129: --
163130: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
163131: --
163132: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
163133: --
163134: -- set event info as cache for other routines to refer event attributes
163135: --
163136:
163136:
163137: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
163138: l_previous_event_id := l_event_id;
163139:
163140: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
163141: (p_application_id => p_application_id
163142: ,p_primary_ledger_id => p_primary_ledger_id
163143: ,p_base_ledger_id => p_base_ledger_id
163144: ,p_target_ledger_id => p_target_ledger_id
163177: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
163178:
163179: IF l_continue_with_lines THEN
163180: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
163181: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
163182:
163183: xla_accounting_err_pkg.build_message
163184: (p_appli_s_name => 'XLA'
163185: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
163185: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
163186: ,p_token_1 => 'LINE_NUMBER'
163187: ,p_value_1 => l_array_extract_line_num(Idx)
163188: ,p_token_2 => 'PRODUCT_NAME'
163189: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
163190: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
163191: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
163192: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
163193:
163186: ,p_token_1 => 'LINE_NUMBER'
163187: ,p_value_1 => l_array_extract_line_num(Idx)
163188: ,p_token_2 => 'PRODUCT_NAME'
163189: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
163190: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
163191: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
163192: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
163193:
163194: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
163187: ,p_value_1 => l_array_extract_line_num(Idx)
163188: ,p_token_2 => 'PRODUCT_NAME'
163189: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
163190: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
163191: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
163192: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
163193:
163194: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
163195: --
163188: ,p_token_2 => 'PRODUCT_NAME'
163189: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
163190: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
163191: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
163192: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
163193:
163194: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
163195: --
163196: -- following sets the accounting attributes needed to reverse
164724:
164725: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
164726: -- or secondary ledger that has different currency with primary
164727: -- or alc that is calculated by sla
164728: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
164729: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
164730:
164731: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
164732: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
164725: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
164726: -- or secondary ledger that has different currency with primary
164727: -- or alc that is calculated by sla
164728: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
164729: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
164730:
164731: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
164732: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
164733: AND (l_actual_flag = 'A')) THEN
164727: -- or alc that is calculated by sla
164728: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
164729: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
164730:
164731: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
164732: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
164733: AND (l_actual_flag = 'A')) THEN
164734: XLA_AE_LINES_PKG.CreateGainOrLossLines(
164735: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
164728: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
164729: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
164730:
164731: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
164732: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
164733: AND (l_actual_flag = 'A')) THEN
164734: XLA_AE_LINES_PKG.CreateGainOrLossLines(
164735: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
164736: ,p_application_id => p_application_id
164731: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
164732: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
164733: AND (l_actual_flag = 'A')) THEN
164734: XLA_AE_LINES_PKG.CreateGainOrLossLines(
164735: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
164736: ,p_application_id => p_application_id
164737: ,p_amb_context_code => 'DEFAULT'
164738: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
164739: ,p_event_class_code => C_EVENT_CLASS_CODE
164734: XLA_AE_LINES_PKG.CreateGainOrLossLines(
164735: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
164736: ,p_application_id => p_application_id
164737: ,p_amb_context_code => 'DEFAULT'
164738: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
164739: ,p_event_class_code => C_EVENT_CLASS_CODE
164740: ,p_event_type_code => C_EVENT_TYPE_CODE
164741:
164742: ,p_gain_ccid => -1
165619:
165620: l_calculate_acctd_flag VARCHAR2(1) :='N';
165621: l_calculate_g_l_flag VARCHAR2(1) :='N';
165622: --
165623: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165624: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165620: l_calculate_acctd_flag VARCHAR2(1) :='N';
165621: l_calculate_g_l_flag VARCHAR2(1) :='N';
165622: --
165623: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165624: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165621: l_calculate_g_l_flag VARCHAR2(1) :='N';
165622: --
165623: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165624: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165622: --
165623: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165624: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165623: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165624: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165624: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165625: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165626: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165627: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165628: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165629: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165630: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165631: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165632: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165633: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165634: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165635: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165636: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165637: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165638: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165639: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165647: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165640: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165647: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165648: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165641: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165647: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165648: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165649:
165642: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165647: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165648: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165649:
165650: l_event_id NUMBER;
165643: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165647: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165648: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165649:
165650: l_event_id NUMBER;
165651: l_previous_event_id NUMBER;
165644: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
165645: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
165646: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
165647: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165648: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
165649:
165650: l_event_id NUMBER;
165651: l_previous_event_id NUMBER;
165652: l_first_event_id NUMBER;
165662: l_event_class_name VARCHAR2(80) := 'Reconciled Payments';
165663: l_description VARCHAR2(4000);
165664: l_transaction_reversal NUMBER;
165665: l_ae_header_id NUMBER;
165666: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
165667: l_log_module VARCHAR2(240);
165668: --
165669: l_acct_reversal_source VARCHAR2(30);
165670: l_trx_reversal_source VARCHAR2(30);
166233:
166234: --
166235: -- set event info as cache for other routines to refer event attributes
166236: --
166237: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
166238: (p_application_id => p_application_id
166239: ,p_primary_ledger_id => p_primary_ledger_id
166240: ,p_base_ledger_id => p_base_ledger_id
166241: ,p_target_ledger_id => p_target_ledger_id
166266:
166267: --
166268: -- set the status of entry to C_VALID (0)
166269: --
166270: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
166271:
166272: --
166273: -- initialize a row for ae header
166274: --
166333: --
166334: -- initilaize the status of ae headers for diffrent balance types
166335: -- the status is initialised to C_NOT_CREATED (2)
166336: --
166337: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166338: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166339: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166340:
166341: --
166334: -- initilaize the status of ae headers for diffrent balance types
166335: -- the status is initialised to C_NOT_CREATED (2)
166336: --
166337: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166338: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166339: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166340:
166341: --
166342: -- call api to validate and store accounting attributes for header
166335: -- the status is initialised to C_NOT_CREATED (2)
166336: --
166337: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166338: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166339: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
166340:
166341: --
166342: -- call api to validate and store accounting attributes for header
166343: --
166394: --
166395: l_trx_reversal_source := SUBSTR(NULL, 1,30);
166396:
166397: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
166398: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
166399:
166400: xla_accounting_err_pkg.build_message
166401: (p_appli_s_name => 'XLA'
166402: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
166402: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
166403: ,p_token_1 => 'ACCT_ATTR_NAME'
166404: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
166405: ,p_token_2 => 'PRODUCT_NAME'
166406: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166407: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166408: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166409: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166410:
166403: ,p_token_1 => 'ACCT_ATTR_NAME'
166404: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
166405: ,p_token_2 => 'PRODUCT_NAME'
166406: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166407: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166408: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166409: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166410:
166411: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
166404: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
166405: ,p_token_2 => 'PRODUCT_NAME'
166406: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166407: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166408: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166409: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166410:
166411: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
166412: --
166405: ,p_token_2 => 'PRODUCT_NAME'
166406: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166407: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166408: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166409: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166410:
166411: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
166412: --
166413: -- following sets the accounting attributes needed to reverse
166424: ----------------------------------------------------------------
166425: -- 4262811 - update the header statuses to invalid in need be
166426: ----------------------------------------------------------------
166427: --
166428: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
166429:
166430:
166431: -----------------------------------------------
166432: -- No accrual reversal for the event class/type
166591: ,p_module => l_log_module);
166592: END IF;
166593:
166594: --
166595: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
166596: --
166597: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
166598: --
166599: -- set event info as cache for other routines to refer event attributes
166593:
166594: --
166595: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
166596: --
166597: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
166598: --
166599: -- set event info as cache for other routines to refer event attributes
166600: --
166601:
166601:
166602: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
166603: l_previous_event_id := l_event_id;
166604:
166605: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
166606: (p_application_id => p_application_id
166607: ,p_primary_ledger_id => p_primary_ledger_id
166608: ,p_base_ledger_id => p_base_ledger_id
166609: ,p_target_ledger_id => p_target_ledger_id
166642: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
166643:
166644: IF l_continue_with_lines THEN
166645: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
166646: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
166647:
166648: xla_accounting_err_pkg.build_message
166649: (p_appli_s_name => 'XLA'
166650: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
166650: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
166651: ,p_token_1 => 'LINE_NUMBER'
166652: ,p_value_1 => l_array_extract_line_num(Idx)
166653: ,p_token_2 => 'PRODUCT_NAME'
166654: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166655: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166656: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166657: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166658:
166651: ,p_token_1 => 'LINE_NUMBER'
166652: ,p_value_1 => l_array_extract_line_num(Idx)
166653: ,p_token_2 => 'PRODUCT_NAME'
166654: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166655: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166656: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166657: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166658:
166659: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
166652: ,p_value_1 => l_array_extract_line_num(Idx)
166653: ,p_token_2 => 'PRODUCT_NAME'
166654: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166655: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166656: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166657: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166658:
166659: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
166660: --
166653: ,p_token_2 => 'PRODUCT_NAME'
166654: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
166655: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
166656: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
166657: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
166658:
166659: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
166660: --
166661: -- following sets the accounting attributes needed to reverse
167848:
167849: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
167850: -- or secondary ledger that has different currency with primary
167851: -- or alc that is calculated by sla
167852: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
167853: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
167854:
167855: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
167856: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
167849: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
167850: -- or secondary ledger that has different currency with primary
167851: -- or alc that is calculated by sla
167852: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
167853: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
167854:
167855: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
167856: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
167857: AND (l_actual_flag = 'A')) THEN
167851: -- or alc that is calculated by sla
167852: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
167853: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
167854:
167855: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
167856: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
167857: AND (l_actual_flag = 'A')) THEN
167858: XLA_AE_LINES_PKG.CreateGainOrLossLines(
167859: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
167852: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
167853: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
167854:
167855: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
167856: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
167857: AND (l_actual_flag = 'A')) THEN
167858: XLA_AE_LINES_PKG.CreateGainOrLossLines(
167859: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
167860: ,p_application_id => p_application_id
167855: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
167856: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
167857: AND (l_actual_flag = 'A')) THEN
167858: XLA_AE_LINES_PKG.CreateGainOrLossLines(
167859: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
167860: ,p_application_id => p_application_id
167861: ,p_amb_context_code => 'DEFAULT'
167862: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
167863: ,p_event_class_code => C_EVENT_CLASS_CODE
167858: XLA_AE_LINES_PKG.CreateGainOrLossLines(
167859: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
167860: ,p_application_id => p_application_id
167861: ,p_amb_context_code => 'DEFAULT'
167862: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
167863: ,p_event_class_code => C_EVENT_CLASS_CODE
167864: ,p_event_type_code => C_EVENT_TYPE_CODE
167865:
167866: ,p_gain_ccid => -1
168627:
168628: l_calculate_acctd_flag VARCHAR2(1) :='N';
168629: l_calculate_g_l_flag VARCHAR2(1) :='N';
168630: --
168631: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168632: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168628: l_calculate_acctd_flag VARCHAR2(1) :='N';
168629: l_calculate_g_l_flag VARCHAR2(1) :='N';
168630: --
168631: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168632: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168629: l_calculate_g_l_flag VARCHAR2(1) :='N';
168630: --
168631: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168632: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168630: --
168631: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168632: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168631: l_array_legal_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168632: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168632: l_array_entity_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168633: l_array_entity_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168634: l_array_transaction_num XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168635: l_array_event_id XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168636: l_array_class_code XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168637: l_array_event_type XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168638: l_array_event_number XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168639: l_array_event_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168640: l_array_transaction_date XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168641: l_array_reference_num_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168642: l_array_reference_num_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168643: l_array_reference_num_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168644: l_array_reference_num_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168645: l_array_reference_char_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168646: l_array_reference_char_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168647: l_array_reference_char_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168655: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168648: l_array_reference_char_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_V240L;
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168655: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168656: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168649: l_array_reference_date_1 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168655: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168656: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168657:
168650: l_array_reference_date_2 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168655: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168656: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168657:
168658: l_event_id NUMBER;
168651: l_array_reference_date_3 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168655: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168656: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168657:
168658: l_event_id NUMBER;
168659: l_previous_event_id NUMBER;
168652: l_array_reference_date_4 XLA_AE_JOURNAL_ENTRY_PKG.t_array_Date;
168653: l_array_event_created_by XLA_AE_JOURNAL_ENTRY_PKG.t_array_V100L;
168654: l_array_budgetary_control_flag XLA_AE_JOURNAL_ENTRY_PKG.t_array_V30L;
168655: l_array_header_events XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168656: l_array_duplicate_checker XLA_AE_JOURNAL_ENTRY_PKG.t_array_Num; --added
168657:
168658: l_event_id NUMBER;
168659: l_previous_event_id NUMBER;
168660: l_first_event_id NUMBER;
168670: l_event_class_name VARCHAR2(80) := 'Refunds';
168671: l_description VARCHAR2(4000);
168672: l_transaction_reversal NUMBER;
168673: l_ae_header_id NUMBER;
168674: l_array_extract_line_num xla_ae_journal_entry_pkg.t_array_Num;
168675: l_log_module VARCHAR2(240);
168676: --
168677: l_acct_reversal_source VARCHAR2(30);
168678: l_trx_reversal_source VARCHAR2(30);
169160:
169161: --
169162: -- set event info as cache for other routines to refer event attributes
169163: --
169164: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
169165: (p_application_id => p_application_id
169166: ,p_primary_ledger_id => p_primary_ledger_id
169167: ,p_base_ledger_id => p_base_ledger_id
169168: ,p_target_ledger_id => p_target_ledger_id
169193:
169194: --
169195: -- set the status of entry to C_VALID (0)
169196: --
169197: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
169198:
169199: --
169200: -- initialize a row for ae header
169201: --
169255: --
169256: -- initilaize the status of ae headers for diffrent balance types
169257: -- the status is initialised to C_NOT_CREATED (2)
169258: --
169259: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169260: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169261: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169262:
169263: --
169256: -- initilaize the status of ae headers for diffrent balance types
169257: -- the status is initialised to C_NOT_CREATED (2)
169258: --
169259: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169260: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169261: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169262:
169263: --
169264: -- call api to validate and store accounting attributes for header
169257: -- the status is initialised to C_NOT_CREATED (2)
169258: --
169259: --g_array_event(l_event_id).array_value_num('actual_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169260: --g_array_event(l_event_id).array_value_num('budget_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169261: --g_array_event(l_event_id).array_value_num('encumbrance_je_status') := XLA_AE_JOURNAL_ENTRY_PKG.C_NOT_CREATED;
169262:
169263: --
169264: -- call api to validate and store accounting attributes for header
169265: --
169318: --
169319: l_trx_reversal_source := SUBSTR(g_array_event(l_event_id).array_value_char('source_172'), 1,30);
169320:
169321: IF NVL(l_trx_reversal_source, 'N') NOT IN ('N','Y') THEN
169322: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
169323:
169324: xla_accounting_err_pkg.build_message
169325: (p_appli_s_name => 'XLA'
169326: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
169326: ,p_msg_name => 'XLA_AP_INVALID_HDR_ATTR'
169327: ,p_token_1 => 'ACCT_ATTR_NAME'
169328: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
169329: ,p_token_2 => 'PRODUCT_NAME'
169330: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169331: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169332: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169333: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169334:
169327: ,p_token_1 => 'ACCT_ATTR_NAME'
169328: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
169329: ,p_token_2 => 'PRODUCT_NAME'
169330: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169331: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169332: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169333: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169334:
169335: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
169328: ,p_value_1 => xla_ae_sources_pkg.GetAccountingSourceName('TRX_ACCT_REVERSAL_OPTION')
169329: ,p_token_2 => 'PRODUCT_NAME'
169330: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169331: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169332: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169333: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169334:
169335: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
169336: --
169329: ,p_token_2 => 'PRODUCT_NAME'
169330: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169331: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169332: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169333: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169334:
169335: ELSIF NVL(l_trx_reversal_source, 'N') = 'Y' THEN
169336: --
169337: -- following sets the accounting attributes needed to reverse
169348: ----------------------------------------------------------------
169349: -- 4262811 - update the header statuses to invalid in need be
169350: ----------------------------------------------------------------
169351: --
169352: XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => hdr_idx);
169353:
169354:
169355: -----------------------------------------------
169356: -- No accrual reversal for the event class/type
169497: ,p_module => l_log_module);
169498: END IF;
169499:
169500: --
169501: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
169502: --
169503: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
169504: --
169505: -- set event info as cache for other routines to refer event attributes
169499:
169500: --
169501: -- set the XLA_AE_JOURNAL_ENTRY_PKG.g_global_status to C_VALID (0)
169502: --
169503: XLA_AE_JOURNAL_ENTRY_PKG.g_global_status := XLA_AE_JOURNAL_ENTRY_PKG.C_VALID;
169504: --
169505: -- set event info as cache for other routines to refer event attributes
169506: --
169507:
169507:
169508: IF l_event_id <> NVL(l_previous_event_id, -1) THEN
169509: l_previous_event_id := l_event_id;
169510:
169511: XLA_AE_JOURNAL_ENTRY_PKG.set_event_info
169512: (p_application_id => p_application_id
169513: ,p_primary_ledger_id => p_primary_ledger_id
169514: ,p_base_ledger_id => p_base_ledger_id
169515: ,p_target_ledger_id => p_target_ledger_id
169548: l_acct_reversal_source := SUBSTR(l_array_source_52(Idx), 1,30);
169549:
169550: IF l_continue_with_lines THEN
169551: IF NVL(l_acct_reversal_source, 'N') NOT IN ('N','Y','B') THEN
169552: xla_ae_journal_entry_pkg.g_global_status := xla_ae_journal_entry_pkg.C_INVALID;
169553:
169554: xla_accounting_err_pkg.build_message
169555: (p_appli_s_name => 'XLA'
169556: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
169556: ,p_msg_name => 'XLA_AP_INVALID_REVERSAL_OPTION'
169557: ,p_token_1 => 'LINE_NUMBER'
169558: ,p_value_1 => l_array_extract_line_num(Idx)
169559: ,p_token_2 => 'PRODUCT_NAME'
169560: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169561: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169562: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169563: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169564:
169557: ,p_token_1 => 'LINE_NUMBER'
169558: ,p_value_1 => l_array_extract_line_num(Idx)
169559: ,p_token_2 => 'PRODUCT_NAME'
169560: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169561: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169562: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169563: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169564:
169565: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
169558: ,p_value_1 => l_array_extract_line_num(Idx)
169559: ,p_token_2 => 'PRODUCT_NAME'
169560: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169561: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169562: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169563: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169564:
169565: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
169566: --
169559: ,p_token_2 => 'PRODUCT_NAME'
169560: ,p_value_2 => xla_ae_journal_entry_pkg.g_cache_event.application_name
169561: ,p_entity_id => xla_ae_journal_entry_pkg.g_cache_event.entity_id
169562: ,p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
169563: ,p_ledger_id => xla_ae_journal_entry_pkg.g_cache_event.target_ledger_id);
169564:
169565: ELSIF NVL(l_acct_reversal_source, 'N') IN ('Y','B') THEN
169566: --
169567: -- following sets the accounting attributes needed to reverse
170390:
170391: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
170392: -- or secondary ledger that has different currency with primary
170393: -- or alc that is calculated by sla
170394: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
170395: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
170396:
170397: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
170398: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
170391: -- only execute it if calculate g/l flag is yes, and primary or secondary ledger
170392: -- or secondary ledger that has different currency with primary
170393: -- or alc that is calculated by sla
170394: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
170395: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
170396:
170397: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
170398: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
170399: AND (l_actual_flag = 'A')) THEN
170393: -- or alc that is calculated by sla
170394: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
170395: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
170396:
170397: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
170398: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
170399: AND (l_actual_flag = 'A')) THEN
170400: XLA_AE_LINES_PKG.CreateGainOrLossLines(
170401: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
170394: IF (((l_calculate_g_l_flag = 'Y' AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code <> 'ALC') or
170395: (XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.ledger_category_code in ('ALC', 'SECONDARY') AND XLA_AE_JOURNAL_ENTRY_PKG.g_cache_ledgers_info.calculate_amts_flag='Y'))
170396:
170397: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
170398: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
170399: AND (l_actual_flag = 'A')) THEN
170400: XLA_AE_LINES_PKG.CreateGainOrLossLines(
170401: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
170402: ,p_application_id => p_application_id
170397: -- IF((l_calculate_g_l_flag='Y' or XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.target_ledger_id <>
170398: -- XLA_AE_JOURNAL_ENTRY_PKG.g_cache_event.ledger_id)
170399: AND (l_actual_flag = 'A')) THEN
170400: XLA_AE_LINES_PKG.CreateGainOrLossLines(
170401: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
170402: ,p_application_id => p_application_id
170403: ,p_amb_context_code => 'DEFAULT'
170404: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
170405: ,p_event_class_code => C_EVENT_CLASS_CODE
170400: XLA_AE_LINES_PKG.CreateGainOrLossLines(
170401: p_event_id => xla_ae_journal_entry_pkg.g_cache_event.event_id
170402: ,p_application_id => p_application_id
170403: ,p_amb_context_code => 'DEFAULT'
170404: ,p_entity_code => xla_ae_journal_entry_pkg.g_cache_event.entity_code
170405: ,p_event_class_code => C_EVENT_CLASS_CODE
170406: ,p_event_type_code => C_EVENT_TYPE_CODE
170407:
170408: ,p_gain_ccid => -1
170557: ,p_level => C_LEVEL_PROCEDURE
170558: ,p_module => l_log_module);
170559: END IF;
170560:
170561: l_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
170562: l_currency_code := xla_ae_journal_entry_pkg.g_cache_ledgers_info.currency_code;
170563: l_sla_ledger_id := xla_ae_journal_entry_pkg.g_cache_ledgers_info.sla_ledger_id;
170564:
170565: --
170558: ,p_module => l_log_module);
170559: END IF;
170560:
170561: l_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
170562: l_currency_code := xla_ae_journal_entry_pkg.g_cache_ledgers_info.currency_code;
170563: l_sla_ledger_id := xla_ae_journal_entry_pkg.g_cache_ledgers_info.sla_ledger_id;
170564:
170565: --
170566: -- initialize array of lines with NULL
170559: END IF;
170560:
170561: l_language := xla_ae_journal_entry_pkg.g_cache_ledgers_info.description_language;
170562: l_currency_code := xla_ae_journal_entry_pkg.g_cache_ledgers_info.currency_code;
170563: l_sla_ledger_id := xla_ae_journal_entry_pkg.g_cache_ledgers_info.sla_ledger_id;
170564:
170565: --
170566: -- initialize array of lines with NULL
170567: --
170993: ,p_level => C_LEVEL_STATEMENT
170994: ,p_module => l_log_module);
170995: END IF;
170996: --
170997: xla_ae_journal_entry_pkg.SetProductAcctDefinition
170998: (p_product_rule_code => 'JA_CN_ACCRUAL'
170999: ,p_product_rule_type_code => 'S'
171000: ,p_product_rule_version => ''
171001: ,p_product_rule_name => 'China Accrual Basis'
171002: ,p_amb_context_code => 'DEFAULT'
171003: );
171004:
171005: l_array_ledgers :=
171006: xla_ae_journal_entry_pkg.GetAlternateCurrencyLedger
171007: (p_base_ledger_id => p_base_ledger_id);
171008:
171009: FOR Idx IN 1 .. l_array_ledgers.COUNT LOOP
171010: l_temp_result :=
171007: (p_base_ledger_id => p_base_ledger_id);
171008:
171009: FOR Idx IN 1 .. l_array_ledgers.COUNT LOOP
171010: l_temp_result :=
171011: XLA_AE_JOURNAL_ENTRY_PKG.GetLedgersInfo
171012: (p_application_id => p_application_id
171013: ,p_base_ledger_id => p_base_ledger_id
171014: ,p_target_ledger_id => l_array_ledgers(Idx)
171015: ,p_primary_ledger_id => p_primary_ledger_id