1996: AND pei.task_id = pt.task_id
1997: AND pei.expenditure_type = pet.expenditure_type
1998: AND pt.project_id =p_project_id
1999: /*start of change for bug 6037734*/
2000: AND (pa_nl_installed.is_nl_installed='N'
2001: OR (pa_nl_installed.is_nl_installed='Y'
2002: AND EXISTS(select NULL from pa_expenditure_items_all ei1
2003: where ei1.expenditure_item_id = pei.expenditure_item_id
2004: and (ei1.attribute6 is not null OR ei1.attribute7 is not null OR ei1.attribute8 is not null
1997: AND pei.expenditure_type = pet.expenditure_type
1998: AND pt.project_id =p_project_id
1999: /*start of change for bug 6037734*/
2000: AND (pa_nl_installed.is_nl_installed='N'
2001: OR (pa_nl_installed.is_nl_installed='Y'
2002: AND EXISTS(select NULL from pa_expenditure_items_all ei1
2003: where ei1.expenditure_item_id = pei.expenditure_item_id
2004: and (ei1.attribute6 is not null OR ei1.attribute7 is not null OR ei1.attribute8 is not null
2005: OR ei1.attribute9 is not null OR ei1.attribute10 is not null)
2009: and ei2.attribute8 is NULL
2010: and ei2.attribute9 is NULL
2011: )
2012: )
2013: OR (pa_nl_installed.is_nl_installed='Y'
2014: AND EXISTS(select null from pa_expenditure_items_all ei3
2015: where ei3.expenditure_item_id = pei.expenditure_item_id
2016: and ei3.attribute6 is NULL
2017: and ei3.attribute7 is NULL