1 package body PA_PROJECT_VERIFY as
2 -- $Header: PAXPCO3B.pls 115.0 99/07/16 15:29:22 porting ship $
3
4
5 i BINARY_INTEGER;
6
7 function get_rule_name(xrow IN NUMBER) return varchar2 IS
8 begin
9 return(verify_rule_name(xrow));
10 end;
11
12 function get_error_code(xrow IN NUMBER) return varchar2 IS
13 begin
14 return(verify_error_code(xrow));
15 end;
16
17 function get_error_msg(xrow IN NUMBER) return varchar2 IS
18 begin
19 return(verify_error_msg(xrow));
20 end;
21
22 function get_action_msg(xrow IN NUMBER) return varchar2 IS
23 begin
24 return(verify_action_msg(xrow));
25 end;
26
27 function get_required_flag(xrow IN NUMBER) return varchar2 IS
28 begin
29 return(verify_required_flag(xrow));
30 end;
31
32
33 PROCEDURE verification (x_project_type IN VARCHAR2, num_rows OUT NUMBER) IS
34
35 -- Commented out this procedure because, the pa_verification_rules and
36 -- pa_project_type_verification table has been dropped fromPA V4.0 May rel.
37
38 --CURSOR get_verify_rules IS
39 --SELECT v.verification_rule rule_name, v.meaning, v.procedure_name,
40 --v.description, p.required_flag
41 --FROM pa_verification_rules v, pa_project_type_verifications p
42 --WHERE p.project_type = x_project_type
43 --AND p.verification_rule = v.verification_rule
44 --AND v.calling_process = 'PROJECT'
45 --ORDER BY p.process_sequence;
46
47 cursor1 integer;
48 proc_stmt varchar2(1000);
49 row_processed integer;
50
51 BEGIN
52
53 num_rows := 0;
54 --cursor1 := dbms_sql.open_cursor;
55
56 --i := 0;
57
58 --FOR EACHREC IN get_verify_rules LOOP
59
60 --IF ( EACHREC.procedure_name is not null and
61 --x_project_type = 'Cost Plus') THEN
62
63 --i := i + 1;
64
65 --proc_stmt := 'begin '||EACHREC.procedure_name||'('||to_char(i)||
66 --','''||EACHREC.meaning||''','''||x_project_type||''','''||
67 --EACHREC.description||''','''||EACHREC.required_flag||'''); end;';
68 --
69 --dbms_sql.parse(cursor1, proc_stmt, dbms_sql.native);
70 --row_processed := dbms_sql.execute(cursor1);
71 --END IF;
72
73 -- dbms_output.put_line(verify_rule_name(i));
74 -- dbms_output.put_line(verify_error_msg(i));
75
76 --END LOOP;
77
78 --dbms_sql.close_cursor(cursor1);
79 --num_rows := i;
80 END;
81
82
83 PROCEDURE manager (x_index IN NUMBER, x_rule_name IN VARCHAR2,
84 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
85 BEGIN
86 If (x_project_type = 'Cost Plus') then
87 verify_rule_name(x_index) := x_rule_name;
88 verify_error_msg(x_index) := 'Project manager does not exist.';
89 verify_action_msg(x_index) := 'Go to Project Options and enter manager in Key Member screen.';
90 verify_required_flag(x_index) := x_flag;
91 end if;
92 END;
93
94 PROCEDURE client (x_index IN NUMBER, x_rule_name IN VARCHAR2,
95 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
96 BEGIN
97 If (x_project_type = 'Cost Plus') then
98 verify_rule_name(x_index) := x_rule_name;
99 verify_error_msg(x_index) := 'Primary customer is required.';
100 verify_action_msg(x_index) := 'Go to Project Options and enter client in Customers and Contacts screen.';
101 verify_required_flag(x_index) := x_flag;
102 end if;
103 END;
104
105 PROCEDURE contact (x_index IN NUMBER, x_rule_name IN VARCHAR2,
106 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
107 BEGIN
108 If (x_project_type = 'Cost Plus') then
109 verify_rule_name(x_index) := x_rule_name;
110 verify_error_msg(x_index) := 'Invalid billing contact specified.';
111 verify_action_msg(x_index) := 'Go to Project Options and enter a billing contact in Customers and Contacts screen.';
112 verify_required_flag(x_index) := x_flag;
113 end if;
114 END;
115
116 PROCEDURE cost_budget (x_index IN NUMBER, x_rule_name IN VARCHAR2,
117 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
118 BEGIN
119 If (x_project_type = 'Cost Plus') then
120 verify_rule_name(x_index) := x_rule_name;
121 verify_error_msg(x_index) := 'Cost budget does not exist.';
122 verify_action_msg(x_index) := 'Go to Project Options and enter cost budget in the Enter Cost Budget screen.';
123 verify_required_flag(x_index) := x_flag;
124 end if;
125
126 END;
127
128 PROCEDURE revenue_budget (x_index IN NUMBER, x_rule_name IN VARCHAR2,
129 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
130 BEGIN
131 If (x_project_type = 'Cost Plus') then
132 verify_rule_name(x_index) := x_rule_name;
133 verify_error_msg(x_index) := 'Revenue budget is incorrect.';
134 verify_action_msg(x_index) := 'Go to Project Options and correct budget in the Enter Revenue Budget screen.';
135 verify_required_flag(x_index) := x_flag;
136 end if;
137
138 END;
139
140 PROCEDURE category (x_index IN NUMBER, x_rule_name IN VARCHAR2,
141 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
142 BEGIN
143 If (x_project_type = 'Cost Plus') then
144 verify_rule_name(x_index) := x_rule_name;
145 verify_error_msg(x_index) := 'Mandatory category Funding Source does not exist';
146 verify_action_msg(x_index) := 'Go to Project Options and enter category
147 and class code in the Classification screen.';
148 verify_required_flag(x_index) := x_flag;
149 end if;
150 END;
151
152 PROCEDURE billing_event (x_index IN NUMBER, x_rule_name IN VARCHAR2,
153 x_project_type IN VARCHAR2, x_description IN VARCHAR2,x_flag IN VARCHAR2) IS
154 BEGIN
155 If (x_project_type = 'Cost Plus') then
156 verify_rule_name(x_index) := x_rule_name;
157 verify_error_msg(x_index) := 'Billing event does not exist.';
158 verify_action_msg(x_index) := 'Go to Project Options and enter billing event in the Events screen under Billing Information.';
159 verify_required_flag(x_index) := x_flag;
160 end if;
161 END;
162
163
164
165 END;