157: end;
158:
159: function cf_miscearningsformula(Assignment_Action_Id in number) return number is
160:
161: Cursor Cur_Pay_Kr_Asg_Elements_V_E is
162: Select Amount
163: From Pay_Kr_Asg_Elements_V
164: Where Classification_Name = 'EARNINGS'
165: And Assignment_Action_Id = Assignment_Action_Id
159: function cf_miscearningsformula(Assignment_Action_Id in number) return number is
160:
161: Cursor Cur_Pay_Kr_Asg_Elements_V_E is
162: Select Amount
163: From Pay_Kr_Asg_Elements_V
164: Where Classification_Name = 'EARNINGS'
165: And Assignment_Action_Id = Assignment_Action_Id
166: Order by Processing_Priority desc;
167: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
163: From Pay_Kr_Asg_Elements_V
164: Where Classification_Name = 'EARNINGS'
165: And Assignment_Action_Id = Assignment_Action_Id
166: Order by Processing_Priority desc;
167: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
168: lvMisc_Earnings NUMBER := 0;
169: begin
170: Open Cur_Pay_Kr_Asg_Elements_V_E ;
171: Loop
166: Order by Processing_Priority desc;
167: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
168: lvMisc_Earnings NUMBER := 0;
169: begin
170: Open Cur_Pay_Kr_Asg_Elements_V_E ;
171: Loop
172: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
173: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
174:
168: lvMisc_Earnings NUMBER := 0;
169: begin
170: Open Cur_Pay_Kr_Asg_Elements_V_E ;
171: Loop
172: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
173: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
174:
175: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
176: lvMisc_Earnings := lvMisc_Earnings + lvResult_Value;
169: begin
170: Open Cur_Pay_Kr_Asg_Elements_V_E ;
171: Loop
172: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
173: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
174:
175: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
176: lvMisc_Earnings := lvMisc_Earnings + lvResult_Value;
177: End IF;
171: Loop
172: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
173: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
174:
175: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
176: lvMisc_Earnings := lvMisc_Earnings + lvResult_Value;
177: End IF;
178: End Loop;
179: Close Cur_Pay_Kr_Asg_Elements_V_E ;
175: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
176: lvMisc_Earnings := lvMisc_Earnings + lvResult_Value;
177: End IF;
178: End Loop;
179: Close Cur_Pay_Kr_Asg_Elements_V_E ;
180:
181: Return ( lvMisc_Earnings );
182: End;
183:
182: End;
183:
184: function cf_mischoursformula(Assignment_Action_Id in number) return number is
185:
186: Cursor Cur_Pay_Kr_Asg_Elements_V_E is
187: Select Hours
188: From Pay_Kr_Asg_Elements_V
189: Where Classification_Name = 'EARNINGS'
190: And Assignment_Action_Id = Assignment_Action_Id
184: function cf_mischoursformula(Assignment_Action_Id in number) return number is
185:
186: Cursor Cur_Pay_Kr_Asg_Elements_V_E is
187: Select Hours
188: From Pay_Kr_Asg_Elements_V
189: Where Classification_Name = 'EARNINGS'
190: And Assignment_Action_Id = Assignment_Action_Id
191: Order by Processing_Priority desc;
192: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
188: From Pay_Kr_Asg_Elements_V
189: Where Classification_Name = 'EARNINGS'
190: And Assignment_Action_Id = Assignment_Action_Id
191: Order by Processing_Priority desc;
192: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
193: lvMisc_Hours NUMBER := 0;
194: begin
195: Open Cur_Pay_Kr_Asg_Elements_V_E ;
196: Loop
191: Order by Processing_Priority desc;
192: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
193: lvMisc_Hours NUMBER := 0;
194: begin
195: Open Cur_Pay_Kr_Asg_Elements_V_E ;
196: Loop
197: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
198: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
199:
193: lvMisc_Hours NUMBER := 0;
194: begin
195: Open Cur_Pay_Kr_Asg_Elements_V_E ;
196: Loop
197: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
198: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
199:
200: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
201: lvMisc_Hours := lvMisc_Hours + lvResult_Value;
194: begin
195: Open Cur_Pay_Kr_Asg_Elements_V_E ;
196: Loop
197: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
198: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
199:
200: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
201: lvMisc_Hours := lvMisc_Hours + lvResult_Value;
202: End IF;
196: Loop
197: Fetch Cur_Pay_Kr_Asg_Elements_V_E Into lvResult_Value ;
198: Exit When Cur_Pay_Kr_Asg_Elements_V_E%NOTFOUND;
199:
200: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
201: lvMisc_Hours := lvMisc_Hours + lvResult_Value;
202: End IF;
203: End Loop;
204: Close Cur_Pay_Kr_Asg_Elements_V_E ;
200: If Cur_Pay_Kr_Asg_Elements_V_E%ROWCOUNT >10 Then
201: lvMisc_Hours := lvMisc_Hours + lvResult_Value;
202: End IF;
203: End Loop;
204: Close Cur_Pay_Kr_Asg_Elements_V_E ;
205:
206: Return ( lvMisc_Hours );
207: End;
208:
207: End;
208:
209: function cf_miscdeductionsformula(Assignment_Action_Id in number) return number is
210:
211: Cursor Cur_Pay_Kr_Asg_Elements_V_D is
212: Select Amount
213: From Pay_Kr_Asg_Elements_V
214: Where Classification_Name = 'DEDUCTIONS'
215: And Assignment_Action_Id = Assignment_Action_Id
209: function cf_miscdeductionsformula(Assignment_Action_Id in number) return number is
210:
211: Cursor Cur_Pay_Kr_Asg_Elements_V_D is
212: Select Amount
213: From Pay_Kr_Asg_Elements_V
214: Where Classification_Name = 'DEDUCTIONS'
215: And Assignment_Action_Id = Assignment_Action_Id
216: Order by Processing_Priority desc;
217: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
213: From Pay_Kr_Asg_Elements_V
214: Where Classification_Name = 'DEDUCTIONS'
215: And Assignment_Action_Id = Assignment_Action_Id
216: Order by Processing_Priority desc;
217: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
218: lvMisc_Deductions NUMBER := 0;
219: begin
220: Open Cur_Pay_Kr_Asg_Elements_V_D ;
221: Loop
216: Order by Processing_Priority desc;
217: lvResult_Value Pay_Kr_Asg_Elements_V.Amount%TYPE := 0;
218: lvMisc_Deductions NUMBER := 0;
219: begin
220: Open Cur_Pay_Kr_Asg_Elements_V_D ;
221: Loop
222: Fetch Cur_Pay_Kr_Asg_Elements_V_D Into lvResult_Value ;
223: Exit When Cur_Pay_Kr_Asg_Elements_V_D%NOTFOUND;
224:
218: lvMisc_Deductions NUMBER := 0;
219: begin
220: Open Cur_Pay_Kr_Asg_Elements_V_D ;
221: Loop
222: Fetch Cur_Pay_Kr_Asg_Elements_V_D Into lvResult_Value ;
223: Exit When Cur_Pay_Kr_Asg_Elements_V_D%NOTFOUND;
224:
225: If Cur_Pay_Kr_Asg_Elements_V_D%ROWCOUNT >10 Then
226: lvMisc_Deductions := lvMisc_Deductions + lvResult_Value;
219: begin
220: Open Cur_Pay_Kr_Asg_Elements_V_D ;
221: Loop
222: Fetch Cur_Pay_Kr_Asg_Elements_V_D Into lvResult_Value ;
223: Exit When Cur_Pay_Kr_Asg_Elements_V_D%NOTFOUND;
224:
225: If Cur_Pay_Kr_Asg_Elements_V_D%ROWCOUNT >10 Then
226: lvMisc_Deductions := lvMisc_Deductions + lvResult_Value;
227: End IF;
221: Loop
222: Fetch Cur_Pay_Kr_Asg_Elements_V_D Into lvResult_Value ;
223: Exit When Cur_Pay_Kr_Asg_Elements_V_D%NOTFOUND;
224:
225: If Cur_Pay_Kr_Asg_Elements_V_D%ROWCOUNT >10 Then
226: lvMisc_Deductions := lvMisc_Deductions + lvResult_Value;
227: End IF;
228: End Loop;
229: Close Cur_Pay_Kr_Asg_Elements_V_D ;
225: If Cur_Pay_Kr_Asg_Elements_V_D%ROWCOUNT >10 Then
226: lvMisc_Deductions := lvMisc_Deductions + lvResult_Value;
227: End IF;
228: End Loop;
229: Close Cur_Pay_Kr_Asg_Elements_V_D ;
230:
231: Return ( lvMisc_Deductions );
232: End;
233: