49:
50: /* Commented for bug 2744993
51: cursor amt_over is
52: select 1
53: from sys.dual
54: where not exists
55: (select 1
56: from pa_agreements_all a,
57: pa_summary_project_fundings f
67: and a.revenue_limit_flag = 'Y');
68: */
69: cursor amt_over is
70: select 1
71: from sys.dual
72: where not exists
73: (select 1
74: from pa_agreements_all a,
75: pa_summary_project_fundings f
152:
153: /* Code for Bug#2303396 */
154:
155: cursor agreements is
156: select 1 from dual where not exists
157: (
158: select PPC.customer_id from pa_project_customers PPC
159: where PPC.project_id= x_project_id
160: and PPC.customer_bill_split > 0 /* Added for Bug2453912 */
1108: x_err_stage := 'Get next agreement id.';
1109:
1110: select pa_agreements_s.nextval
1111: into x_agreement_id
1112: from dual;
1113:
1114: -- dbms_output.put_line('x_agreement_id = '||to_char(x_agreement_id));
1115: x_err_stage := 'Insert into pa_agreements.';
1116:
1788: BEGIN
1789:
1790: BEGIN
1791: select 'Y' into l_fund_exists
1792: from dual
1793: where exists(select null
1794: from pa_summary_project_fundings spf
1795: where spf.project_id = x_project_id);
1796:
1830:
1831: begin
1832: Select 'N'
1833: Into l_Exist_Flag
1834: from dual
1835: where exists ( select null
1836: From PA_Project_Fundings
1837: Where Project_ID = P_Project_ID
1838: and budget_type_code = 'DRAFT');
1893: begin
1894: -- Case 1 : If it has any project level unbaselined funding
1895: Select 'N'
1896: Into l_Exist_Flag
1897: from dual
1898: where exists ( select null
1899: From PA_Project_Fundings
1900: Where Project_ID = P_Project_ID
1901: and Task_ID IS NULL
1990:
1991: begin
1992: Select 'N'
1993: Into l_Exist_Flag
1994: from dual
1995: where exists ( select null
1996: From PA_Project_Fundings
1997: Where Project_ID = P_Project_ID
1998: AND Task_ID = P_Task_ID
2027: /* Fix for bug 7437739 starts here*/
2028: begin
2029: select 'N'
2030: into l_Exist_Flag
2031: from dual
2032: where exists (select 1
2033: from pa_expenditure_items_all ei, pa_tasks pt
2034: where ei.task_id = pt.task_id
2035: and pt.top_task_id = P_Task_ID
2046: begin
2047:
2048: select 'N'
2049: into l_Exist_Flag
2050: from dual where exists (select 1
2051: from pa_expenditure_items_all ei, pa_tasks pt
2052: where ei.task_id = pt.task_id
2053: and pt.top_task_id = P_Task_ID
2054: and pt.project_id = P_Project_ID