[Home] [Help]
327: Payroll_Accrual_Flag(i),
328: Rbc_Element_Type_Id(i),
329: Interface_Run_Id(i),
330: Rate_Source_CodeTab(i),
331: Costing_Method_Tab(i) from pa_expenditure_items
332: where expenditure_item_id = X_adj_expend_item_id;
333:
334:
335: END IF;
641: IF P_DEBUG_MODE THEN
642: pa_cc_utils.log_message('InsItems: ' || 'Start of bulk insert for EI insertion');
643: END IF;
644: FORALL i IN 1..Rows ---{
645: INSERT INTO pa_expenditure_items_all (
646: expenditure_item_id
647: , expenditure_id
648: , expenditure_item_date
649: , task_id
939:
940: --PA-K Changes: Commented the following as bulk insert for EIs is being done now
941: /*IF nvl(X_gl_flag,'N') <> 'Y' THEN
942: **
943: **INSERT INTO pa_expenditure_items_all (
944: ** )
945: ** VALUES (
946: ** );
947: **ELSE
944: ** )
945: ** VALUES (
946: ** );
947: **ELSE
948: ** INSERT INTO pa_expenditure_items_all (
949: ** )
950: ** VALUES (
951: ** );
952: */
1234:
1235: /* Insert the Reversing expenditure Items */
1236:
1237: FORALL i IN 1..Rows
1238: INSERT INTO pa_expenditure_items_all(
1239: expenditure_item_id
1240: , task_id
1241: , expenditure_type
1242: , system_linkage_function
1491: , ei.Interface_Run_Id /* end changes for 12581268 */
1492: , ei.cbs_element_id -- Added for CBS Enhancement Bug 16220146
1493:
1494: FROM
1495: pa_expenditure_items_all ei
1496: WHERE
1497: ei.expenditure_item_id = TfrEiTab(i);
1498:
1499: FOR i IN 1..Rows LOOP
1961: pa_cc_utils.log_message('CreateRelatedItem: ' || 'Work Type ID defaults from source EI');
1962: END IF;
1963: select work_type_id
1964: into l_work_type_id
1965: from pa_expenditure_items
1966: where expenditure_item_id = X_source_exp_item_id;
1967: end if;
1968: /* changes for bug2482593 ends */
1969:
1968: /* changes for bug2482593 ends */
1969:
1970: -- Need to select new MC columns here to pass to LoadEi and PATC
1971: SELECT
1972: pa_expenditure_items_s.nextval
1973: , ei.expenditure_id
1974: , ei.expenditure_item_date
1975: , e.incurred_by_person_id
1976: , e.incurred_by_organization_id
2026: , l_ASSIGNMENT_ID
2027: /* , l_WORK_TYPE_ID bug2482593*/
2028: , l_cbs_element_id -- Added for CBS Enhancement Bug 16220146
2029: FROM
2030: pa_expenditure_items ei
2031: , pa_expenditures e
2032: , pa_tasks t
2033: WHERE
2034: e.expenditure_id = ei.expenditure_id
2455: {
2456: pa_cc_utils.log_message("Work Type ID defaults from source EI");
2457: select work_type_id
2458: into l_work_type_id
2459: from pa_expenditure_items
2460: where expenditure_item_id = X_Expenditure_item_id;
2461: }
2462: */
2463: end if;
2462: */
2463: end if;
2464: /* changes for bug 2482593 end */
2465:
2466: UPDATE pa_expenditure_items ei
2467: SET ei.denom_raw_cost = pa_currency.round_trans_currency_amt(X_denom_raw_cost,
2468: ei.denom_currency_code)
2469: ,ei.RAW_COST = NULL /* Added for bug#5067217 */
2470: ,ei.ACCT_RAW_COST = NULL /* Added for bug#5067217*/
2475: AND (ei.adjusted_expenditure_item_id is NULL or ei.denom_raw_cost is NULL); /*bug 5617096*/
2476:
2477: /*
2478: * Commented for Bug 5617096
2479: UPDATE pa_expenditure_items ei
2480: SET
2481: ei.denom_raw_cost = pa_currency.round_trans_currency_amt(X_denom_raw_cost,
2482: ei.denom_currency_code)
2483: , ei.raw_cost_rate = X_denom_raw_cost_rate
2508: )
2509: IS
2510: BEGIN
2511:
2512: UPDATE pa_expenditure_items ei
2513: SET ei.system_linkage_function = X_sys_link_func
2514: WHERE ei.source_expenditure_item_id = X_expend_item_id;
2515:
2516: