Project Accounting – Auto Accounting Rule – Extend Labour Control Account
We had a requirement to extend the labour control accounts to use different accounts depending on the capitalisation status of the transaction. This enclosed SQL statement is an example of how the issues was resolved. This allowed us to specify a different account depending on the type of project.
SELECT DECODE(project_type_class_code,'CAPITAL', DECODE(billable_flag, 'Y','CAPITAL CoA Segement Value', 'NON-CAPITAL CoA Segment Value') ,'NON-CAPITAL CoA Segment Value') "Value" FROM pa_expenditure_items_all pei, pa_projects_all ppa, PA_PROJECT_TYPES_ALL ppt WHERE 1 =1 AND expenditure_item_id = :1 AND pei.project_id = ppa.project_id AND ppa.project_type = ppt.project_type;