[Home] [Help]
80:
81: -- BEGIN Bug 10298995 : Added for Viasat enhancement
82: cursor res_asgn_csr IS
83: select resource_assignment_id, txn_currency_code
84: from pa_resource_asgn_curr
85: where budget_version_id = P_BUDGET_VERSION_ID;
86:
87: l_res_asgn_id_tab SYSTEM.pa_num_tbl_type:=SYSTEM.pa_num_tbl_type();
88: l_txn_curr_code_tab SYSTEM.pa_varchar2_15_tbl_type:=SYSTEM.pa_varchar2_15_tbl_type();
3552:
3553: IF l_ra_id_tab_table(i).count > 0 AND
3554: l_planning_options_flag_tab(i) = 'Y' THEN
3555:
3556: DELETE pa_resource_asgn_curr_tmp;
3557:
3558: -- As per the copy_table_records API specification, when calling the
3559: -- maintenance API in temp table Copy mode, populate the temp table
3560: -- with distinct target ra_id values (without txn_currency_code values).
3558: -- As per the copy_table_records API specification, when calling the
3559: -- maintenance API in temp table Copy mode, populate the temp table
3560: -- with distinct target ra_id values (without txn_currency_code values).
3561:
3562: INSERT INTO pa_resource_asgn_curr_tmp
3563: ( resource_assignment_id )
3564: SELECT DISTINCT column_value
3565: FROM TABLE( CAST( l_ra_id_tab_table(i) AS SYSTEM.pa_num_tbl_type ));
3566:
3607: l_non_billable_fp_ra_id_tab.count > 0 AND
3608: l_fp_cols_rec_fp.x_version_type = 'ALL' AND
3609: l_fp_cols_rec_target.x_version_type IN ('REVENUE','ALL') THEN
3610:
3611: DELETE pa_resource_asgn_curr_tmp;
3612:
3613: -- Note: An outer join on pa_tasks is not needed in the query
3614: -- below because we are only interested in updating resources
3615: -- for non-billable tasks. Project-level tasks that require an
3613: -- Note: An outer join on pa_tasks is not needed in the query
3614: -- below because we are only interested in updating resources
3615: -- for non-billable tasks. Project-level tasks that require an
3616: -- outer join are always billable.
3617: INSERT INTO pa_resource_asgn_curr_tmp
3618: ( RESOURCE_ASSIGNMENT_ID,
3619: TXN_CURRENCY_CODE,
3620: TXN_RAW_COST_RATE_OVERRIDE,
3621: TXN_BURDEN_COST_RATE_OVERRIDE )
3622: SELECT rbc.resource_assignment_id,
3623: rbc.txn_currency_code,
3624: rbc.txn_raw_cost_rate_override,
3625: rbc.txn_burden_cost_rate_override
3626: FROM pa_resource_asgn_curr rbc
3627: WHERE rbc.budget_version_id = p_budget_version_id
3628: AND rbc.txn_bill_rate_override IS NOT NULL
3629: AND EXISTS ( SELECT null
3630: FROM TABLE(CAST( l_non_billable_fp_ra_id_tab AS SYSTEM.pa_num_tbl_type ))
3662: END IF;
3663: END IF; -- IF l_count > 0 THEN
3664: END IF; -- logic to null out bill rate overrides for non-billable tasks
3665:
3666: END IF; -- logic to copy source pa_resource_asgn_curr overrides
3667: -- END OF IPM: New Entity ER ------------------------------------------
3668:
3669:
3670: IF l_fp_cols_rec_target.x_version_type = 'REVENUE' and l_rev_gen_method = 'C' THEN