DBA Data[Home] [Help]

APPS.PSP_PAYTRN dependencies on PAY_COSTS

Line 133: and exists (select assignment_action_id from pay_costs where

129: and pai1.locking_action_id = paa2.assignment_action_id) -- End of changes for bug fix 3263333
130: and paa2.payroll_action_id = ppa2.payroll_action_id
131: and ppa2.action_type = 'C'
132: and ppa2.action_status='C'
133: and exists (select assignment_action_id from pay_costs where
134: assignment_action_id=paa2.assignment_action_id)
135: UNION
136: -- broke the decode for bug 6409008
137: /* Now for 'B'*/

Line 161: (select assignment_action_id from pay_costs where assignment_action_id=paa1.assignment_action_id))

157: and pai1.locked_action_id = paa2.assignment_action_id) -- End of changes for bug fix 3263333
158: and paa2.payroll_action_id = ppa2.payroll_action_id
159: and ppa2.action_type not in ('R','Q' ,'F','V')
160: and exists
161: (select assignment_action_id from pay_costs where assignment_action_id=paa1.assignment_action_id))
162: UNION
163: /* Now for '0' etc: */
164: (select paa1.assignment_id, paa1.assignment_action_id,
165: ppa1.payroll_id, ppa1.payroll_action_id, ppa1.effective_date, ppa1.date_earned,

Line 187: (select assignment_action_id from pay_costs where assignment_action_id=paa1.assignment_action_id))

183: and pai1.locked_action_id = paa2.assignment_action_id) -- End of changes for bug fix 3263333
184: and paa2.payroll_action_id = ppa2.payroll_action_id
185: and ppa2.action_type not in ('R','Q' ,'F','V')
186: and exists
187: (select assignment_action_id from pay_costs where assignment_action_id=paa1.assignment_action_id))
188: order by 9 desc, 7 desc, 2 desc; -- Bug 7116131;
189:
190: /*added end*/
191:

Line 242: and a.assignment_action_id in (select distinct(assignment_action_id) from pay_costs)

238: and (a.assignment_id = b.assignment_id and
239: ((l_start_date between effective_start_date and effective_end_date) or
240: (l_end_date between effective_start_date and effective_end_date) or
241: (l_start_date <= effective_start_date and l_end_date >= effective_end_date)))
242: and a.assignment_action_id in (select distinct(assignment_action_id) from pay_costs)
243: order by a.assignment_id;
244:
245:
246: check on effective date changed

Line 248: restriction on assignment_action id in selecting only those employees for whom arecord exists in pay_costs table:-

244:
245:
246: check on effective date changed
247: g_payroll_rec.effective_date between b.effective_start_date and b.effective_end_date)
248: restriction on assignment_action id in selecting only those employees for whom arecord exists in pay_costs table:-
249: fixed by Subha, :- Caltech
250: */
251: --Declare variables for above cursor
252:

Line 259: CURSOR get_pay_costs_csr is

255: l_person_id number := 0;
256: l_employee_name varchar2(240);
257: l_cur_rec number;
258:
259: CURSOR get_pay_costs_csr is
260: SELECT a.cost_id, --- REgular run results
261: a.costed_value,
262: a.debit_or_credit,
263: a.balance_or_cost,

Line 275: FROM PAY_COSTS a, PAY_RUN_RESULTS b, PSP_ELEMENT_TYPES c, PAY_ELEMENT_TYPES_F d,

271: ptp.start_date tp_start_date,
272: ptp.end_date tp_end_date,
273: ptp.time_period_id,
274: NVL(b.element_entry_id, (SELECT element_entry_id FROM pay_run_results prr where prr.run_result_id = b.source_id)) source_id
275: FROM PAY_COSTS a, PAY_RUN_RESULTS b, PSP_ELEMENT_TYPES c, PAY_ELEMENT_TYPES_F d,
276: pay_assignment_actions asga, pay_payroll_actions paya, per_time_periods ptp,
277: pay_input_values_f piv
278: WHERE a.assignment_action_id = l_assignment_action_id and
279: SUBSTR(piv.uom, 1, 1) IN ('M', g_uom) AND

Line 317: FROM PAY_COSTS a, PAY_RUN_RESULTS b, PSP_ELEMENT_TYPES c, PAY_ELEMENT_TYPES_F d,

313: ptp.start_date tp_start_date,
314: ptp.end_date tp_end_date,
315: ptp.time_period_id,
316: NVL(b.element_entry_id, (SELECT element_entry_id FROM pay_run_results prr where prr.run_result_id = b.source_id)) source_id
317: FROM PAY_COSTS a, PAY_RUN_RESULTS b, PSP_ELEMENT_TYPES c, PAY_ELEMENT_TYPES_F d,
318: pay_assignment_actions asga, pay_payroll_actions paya, per_time_periods ptp,
319: pay_input_values_f piv
320: WHERE a.assignment_action_id = l_assignment_action_id and
321: SUBSTR(piv.uom, 1, 1) IN ('M', g_uom) AND

Line 345: g_pay_costs_rec get_pay_costs_csr%ROWTYPE;

341: and ptp.payroll_id = l_payroll_id
342: and b.end_date between ptp.start_date and ptp.end_date
343: order by time_period_id desc , 15 asc;
344:
345: g_pay_costs_rec get_pay_costs_csr%ROWTYPE;
346:
347: CURSOR check_payroll_lines_csr is
348: SELECT cost_id
349: FROM PSP_PAYROLL_LINES

Line 350: WHERE cost_id = g_pay_costs_rec.cost_id;

346:
347: CURSOR check_payroll_lines_csr is
348: SELECT cost_id
349: FROM PSP_PAYROLL_LINES
350: WHERE cost_id = g_pay_costs_rec.cost_id;
351:
352: --Declare variable for above cursor
353:
354: l_cost_id number(15) := 0;

Line 516: WHERE element_entry_id = g_pay_costs_rec.source_id;

512:
513: CURSOR ee_date_earned_cur IS
514: SELECT effective_start_date, effective_end_date,date_earned --LD Dev
515: FROM pay_element_entries_f
516: WHERE element_entry_id = g_pay_costs_rec.source_id;
517:
518: CURSOR emphours_config_cur IS
519: SELECT DECODE(pcv_information1, 'Y', 'H', 'M') employee_hours
520: FROM pqp_configuration_values

Line 846: -- moving calendar logic to LOOP of get_pay_costs_csr

842:
843:
844: EXIT WHEN get_payroll_assig_actions_csr%NOTFOUND; -- Exit when last record is reached
845: BEGIN
846: -- moving calendar logic to LOOP of get_pay_costs_csr
847:
848:
849:
850:

Line 851: -- Get all transactions from pay_costs table based on

847:
848:
849:
850:
851: -- Get all transactions from pay_costs table based on
852: -- assignment_action_id we got from assignment actions
853:
854:
855: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_assigment_id, l_assignment_action_id, p_time_period_id = '||l_assignment_id||','||

Line 858: OPEN get_pay_costs_csr;

854:
855: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_assigment_id, l_assignment_action_id, p_time_period_id = '||l_assignment_id||','||
856: l_assignment_action_id||','||p_time_period_id);
857:
858: OPEN get_pay_costs_csr;
859: FETCH get_pay_costs_csr into g_pay_costs_rec;
860: IF get_pay_costs_csr%NOTFOUND then
861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);
862: raise NO_DATA_FOUND;

Line 859: FETCH get_pay_costs_csr into g_pay_costs_rec;

855: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_assigment_id, l_assignment_action_id, p_time_period_id = '||l_assignment_id||','||
856: l_assignment_action_id||','||p_time_period_id);
857:
858: OPEN get_pay_costs_csr;
859: FETCH get_pay_costs_csr into g_pay_costs_rec;
860: IF get_pay_costs_csr%NOTFOUND then
861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);
862: raise NO_DATA_FOUND;
863: close get_pay_costs_csr;

Line 860: IF get_pay_costs_csr%NOTFOUND then

856: l_assignment_action_id||','||p_time_period_id);
857:
858: OPEN get_pay_costs_csr;
859: FETCH get_pay_costs_csr into g_pay_costs_rec;
860: IF get_pay_costs_csr%NOTFOUND then
861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);
862: raise NO_DATA_FOUND;
863: close get_pay_costs_csr;
864: END IF;

Line 861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);

857:
858: OPEN get_pay_costs_csr;
859: FETCH get_pay_costs_csr into g_pay_costs_rec;
860: IF get_pay_costs_csr%NOTFOUND then
861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);
862: raise NO_DATA_FOUND;
863: close get_pay_costs_csr;
864: END IF;
865: close get_pay_costs_csr;

Line 863: close get_pay_costs_csr;

859: FETCH get_pay_costs_csr into g_pay_costs_rec;
860: IF get_pay_costs_csr%NOTFOUND then
861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);
862: raise NO_DATA_FOUND;
863: close get_pay_costs_csr;
864: END IF;
865: close get_pay_costs_csr;
866: l_prev_time_period_id := null;
867: l_prev_start_date := TO_DATE('1','j');

Line 865: close get_pay_costs_csr;

861: hr_utility.trace(' get_pay_costs_csr NO_DATA_FOUND l_assignment_action_id = '||l_assignment_action_id);
862: raise NO_DATA_FOUND;
863: close get_pay_costs_csr;
864: END IF;
865: close get_pay_costs_csr;
866: l_prev_time_period_id := null;
867: l_prev_start_date := TO_DATE('1','j');
868: l_prev_end_date := TO_DATE('1','j');
869:

Line 870: hr_utility.trace(' opening get_pay_costs_csr for l_assignment_action_id = '||l_assignment_action_id);

866: l_prev_time_period_id := null;
867: l_prev_start_date := TO_DATE('1','j');
868: l_prev_end_date := TO_DATE('1','j');
869:
870: hr_utility.trace(' opening get_pay_costs_csr for l_assignment_action_id = '||l_assignment_action_id);
871:
872: OPEN get_pay_costs_csr;
873: LOOP --LOOP1 begin
874: BEGIN

Line 872: OPEN get_pay_costs_csr;

868: l_prev_end_date := TO_DATE('1','j');
869:
870: hr_utility.trace(' opening get_pay_costs_csr for l_assignment_action_id = '||l_assignment_action_id);
871:
872: OPEN get_pay_costs_csr;
873: LOOP --LOOP1 begin
874: BEGIN
875: fetch get_pay_costs_csr into g_pay_costs_rec;
876: EXIT WHEN get_pay_costs_csr%NOTFOUND ;

Line 875: fetch get_pay_costs_csr into g_pay_costs_rec;

871:
872: OPEN get_pay_costs_csr;
873: LOOP --LOOP1 begin
874: BEGIN
875: fetch get_pay_costs_csr into g_pay_costs_rec;
876: EXIT WHEN get_pay_costs_csr%NOTFOUND ;
877:
878: hr_utility.trace(' NEXT loop iteration');
879: hr_utility.trace(' Initial g_entry_date_earned: ' || to_char(g_entry_date_earned,'DD-MON-YYYY'));

Line 876: EXIT WHEN get_pay_costs_csr%NOTFOUND ;

872: OPEN get_pay_costs_csr;
873: LOOP --LOOP1 begin
874: BEGIN
875: fetch get_pay_costs_csr into g_pay_costs_rec;
876: EXIT WHEN get_pay_costs_csr%NOTFOUND ;
877:
878: hr_utility.trace(' NEXT loop iteration');
879: hr_utility.trace(' Initial g_entry_date_earned: ' || to_char(g_entry_date_earned,'DD-MON-YYYY'));
880: hr_utility.trace(' g_pay_costs_rec.source_id: ' || to_char(g_pay_costs_rec.source_id));

Line 880: hr_utility.trace(' g_pay_costs_rec.source_id: ' || to_char(g_pay_costs_rec.source_id));

876: EXIT WHEN get_pay_costs_csr%NOTFOUND ;
877:
878: hr_utility.trace(' NEXT loop iteration');
879: hr_utility.trace(' Initial g_entry_date_earned: ' || to_char(g_entry_date_earned,'DD-MON-YYYY'));
880: hr_utility.trace(' g_pay_costs_rec.source_id: ' || to_char(g_pay_costs_rec.source_id));
881:
882:
883: g_entry_date_earned := NULL;
884: OPEN ee_date_earned_cur;

Line 892: g_pay_costs_rec.date_earned := NVL(g_entry_date_earned, g_pay_costs_rec.date_earned);

888: hr_utility.trace(' after cursor g_effective_start_date: ' || to_char(g_effective_start_date,'DD-MON-YYYY'));
889: hr_utility.trace(' after cursor g_effective_end_date: ' || to_char(g_effective_end_date,'DD-MON-YYYY'));
890: hr_utility.trace(' after cursor g_entry_date_earned: ' || to_char(g_entry_date_earned,'DD-MON-YYYY'));
891:
892: g_pay_costs_rec.date_earned := NVL(g_entry_date_earned, g_pay_costs_rec.date_earned);
893:
894: /* Commented for bug 6046087
895: -- Bug 5642002: get the element date if available
896: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);

Line 896: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);

892: g_pay_costs_rec.date_earned := NVL(g_entry_date_earned, g_pay_costs_rec.date_earned);
893:
894: /* Commented for bug 6046087
895: -- Bug 5642002: get the element date if available
896: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);
897: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);
898: */
899:
900: -- Introduced the following IF - END IF for Bug 6046087

Line 897: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);

893:
894: /* Commented for bug 6046087
895: -- Bug 5642002: get the element date if available
896: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);
897: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);
898: */
899:
900: -- Introduced the following IF - END IF for Bug 6046087
901: IF (g_ignore_date_earned = 'Y') THEN

Line 902: g_start_date := g_pay_costs_rec.tp_start_date;

898: */
899:
900: -- Introduced the following IF - END IF for Bug 6046087
901: IF (g_ignore_date_earned = 'Y') THEN
902: g_start_date := g_pay_costs_rec.tp_start_date;
903: g_end_date := g_pay_costs_rec.tp_end_date;
904:
905: hr_utility.trace('IF cost_id, start_Date,
906: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||

Line 903: g_end_date := g_pay_costs_rec.tp_end_date;

899:
900: -- Introduced the following IF - END IF for Bug 6046087
901: IF (g_ignore_date_earned = 'Y') THEN
902: g_start_date := g_pay_costs_rec.tp_start_date;
903: g_end_date := g_pay_costs_rec.tp_end_date;
904:
905: hr_utility.trace('IF cost_id, start_Date,
906: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
907: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||

Line 906: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||

902: g_start_date := g_pay_costs_rec.tp_start_date;
903: g_end_date := g_pay_costs_rec.tp_end_date;
904:
905: hr_utility.trace('IF cost_id, start_Date,
906: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
907: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
908: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
909:
910: ELSE

Line 907: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||

903: g_end_date := g_pay_costs_rec.tp_end_date;
904:
905: hr_utility.trace('IF cost_id, start_Date,
906: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
907: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
908: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
909:
910: ELSE
911: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);

Line 908: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);

904:
905: hr_utility.trace('IF cost_id, start_Date,
906: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
907: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
908: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
909:
910: ELSE
911: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);
912: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);

Line 911: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);

907: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
908: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
909:
910: ELSE
911: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);
912: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);
913:
914: hr_utility.trace('ELSE cost_id, start_Date,
915: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||

Line 912: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);

908: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
909:
910: ELSE
911: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);
912: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);
913:
914: hr_utility.trace('ELSE cost_id, start_Date,
915: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
916: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||

Line 915: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||

911: g_start_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.start_date), g_pay_costs_rec.tp_start_date);
912: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);
913:
914: hr_utility.trace('ELSE cost_id, start_Date,
915: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
916: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
917: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
918: END IF;
919:

Line 916: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||

912: g_end_date := NVL(NVL(g_entry_date_earned, g_pay_costs_rec.end_date), g_pay_costs_rec.tp_end_date);
913:
914: hr_utility.trace('ELSE cost_id, start_Date,
915: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
916: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
917: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
918: END IF;
919:
920: hr_utility.trace(' g_start_date ' || to_char(g_start_date,'DD-MON-YYYY'));

Line 917: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);

913:
914: hr_utility.trace('ELSE cost_id, start_Date,
915: end_Date, tp_id , action_type='||g_pay_costs_rec.cost_id||','||
916: g_pay_costs_rec.tp_start_date||','||g_pay_costs_rec.tp_end_date||','||
917: g_pay_costs_rec.time_period_id||','||g_pay_costs_rec.action_type);
918: END IF;
919:
920: hr_utility.trace(' g_start_date ' || to_char(g_start_date,'DD-MON-YYYY'));
921: hr_utility.trace(' g_end_date ' || to_char(g_end_date,'DD-MON-YYYY'));

Line 936: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||

932: IF (l_aw_column IS NOT NULL) THEN
933: BEGIN
934: EXECUTE IMMEDIATE 'SELECT ' || l_gl_column || ', ' || l_pt_column || ', ' ||
935: l_tk_column || ', ' || l_aw_column || ', ' || l_eo_column || ', ' || l_et_column ||
936: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||
937: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
938: INTO l_or_gl_ccid, l_or_project_id, l_or_task_id, l_or_award_id, l_or_expenditure_org_id, l_or_expenditure_type
939: USING g_pay_costs_rec.date_earned;
940: EXCEPTION

Line 939: USING g_pay_costs_rec.date_earned;

935: l_tk_column || ', ' || l_aw_column || ', ' || l_eo_column || ', ' || l_et_column ||
936: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||
937: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
938: INTO l_or_gl_ccid, l_or_project_id, l_or_task_id, l_or_award_id, l_or_expenditure_org_id, l_or_expenditure_type
939: USING g_pay_costs_rec.date_earned;
940: EXCEPTION
941: WHEN OTHERS THEN
942: hr_utility.trace(' No Element Entry record found');
943: END;

Line 948: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||

944: ELSE
945: BEGIN
946: EXECUTE IMMEDIATE 'SELECT ' || l_gl_column || ', ' || l_pt_column || ', ' ||
947: l_tk_column || ', ' || l_eo_column || ', ' || l_et_column ||
948: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||
949: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
950: INTO l_or_gl_ccid, l_or_project_id, l_or_task_id, l_or_expenditure_org_id, l_or_expenditure_type
951: USING g_pay_costs_rec.date_earned;
952: EXCEPTION

Line 951: USING g_pay_costs_rec.date_earned;

947: l_tk_column || ', ' || l_eo_column || ', ' || l_et_column ||
948: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||
949: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
950: INTO l_or_gl_ccid, l_or_project_id, l_or_task_id, l_or_expenditure_org_id, l_or_expenditure_type
951: USING g_pay_costs_rec.date_earned;
952: EXCEPTION
953: WHEN OTHERS THEN
954: hr_utility.trace(' No Element Entry record found');
955: END;

Line 960: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||

956: END IF;
957: ELSIF (l_gl_column IS NOT NULL) THEN
958: BEGIN
959: EXECUTE IMMEDIATE 'SELECT ' || l_gl_column ||
960: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||
961: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
962: INTO l_or_gl_ccid
963: USING g_pay_costs_rec.date_earned;
964: EXCEPTION

Line 963: USING g_pay_costs_rec.date_earned;

959: EXECUTE IMMEDIATE 'SELECT ' || l_gl_column ||
960: ' FROM pay_element_entries_f WHERE element_entry_id = ' || g_pay_costs_rec.source_id ||
961: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
962: INTO l_or_gl_ccid
963: USING g_pay_costs_rec.date_earned;
964: EXCEPTION
965: WHEN OTHERS THEN
966: hr_utility.trace(' No Element Entry record found');
967: END;

Line 974: g_pay_costs_rec.source_id ||

970: BEGIN
971: EXECUTE IMMEDIATE 'SELECT ' || l_pt_column || ', ' || l_tk_column || ', ' ||
972: l_aw_column || ', ' || l_eo_column || ', ' || l_et_column ||
973: ' FROM pay_element_entries_f WHERE element_entry_id = ' ||
974: g_pay_costs_rec.source_id ||
975: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
976: INTO l_or_project_id, l_or_task_id, l_or_award_id, l_or_expenditure_org_id, l_or_expenditure_type
977: USING g_pay_costs_rec.date_earned;
978: EXCEPTION

Line 977: USING g_pay_costs_rec.date_earned;

973: ' FROM pay_element_entries_f WHERE element_entry_id = ' ||
974: g_pay_costs_rec.source_id ||
975: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
976: INTO l_or_project_id, l_or_task_id, l_or_award_id, l_or_expenditure_org_id, l_or_expenditure_type
977: USING g_pay_costs_rec.date_earned;
978: EXCEPTION
979: WHEN OTHERS THEN
980: hr_utility.trace(' No Element Entry record found');
981: END;

Line 987: g_pay_costs_rec.source_id ||

983: BEGIN
984: EXECUTE IMMEDIATE 'SELECT ' || l_pt_column || ', ' || l_tk_column || ', ' ||
985: l_eo_column || ', ' || l_et_column ||
986: ' FROM pay_element_entries_f WHERE element_entry_id = ' ||
987: g_pay_costs_rec.source_id ||
988: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
989: INTO l_or_project_id, l_or_task_id, l_or_expenditure_org_id, l_or_expenditure_type
990: USING g_pay_costs_rec.date_earned;
991: EXCEPTION

Line 990: USING g_pay_costs_rec.date_earned;

986: ' FROM pay_element_entries_f WHERE element_entry_id = ' ||
987: g_pay_costs_rec.source_id ||
988: ' AND :g_date_earned BETWEEN effective_start_date AND effective_end_date'
989: INTO l_or_project_id, l_or_task_id, l_or_expenditure_org_id, l_or_expenditure_type
990: USING g_pay_costs_rec.date_earned;
991: EXCEPTION
992: WHEN OTHERS THEN
993: hr_utility.trace(' No Element Entry record found');
994: END;

Line 1006: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;

1002: SELECT full_name
1003: INTO l_employee_name
1004: FROM per_people_f
1005: WHERE person_id = l_person_id
1006: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;
1007: l_value := 'Organization Id = ' || TO_CHAR(l_or_expenditure_org_id);
1008: l_table := 'HR_ORGANIZATION_UNITS';
1009: fnd_message.set_name('PSP','PSP_TR_VALUE_NOT_FOUND');
1010: fnd_message.set_token('VALUE', l_value);

Line 1026: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;

1022: SELECT full_name
1023: INTO l_employee_name
1024: FROM per_people_f
1025: WHERE person_id = l_person_id
1026: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;
1027: l_value := 'Project Id = ' || TO_CHAR(l_or_project_id);
1028: l_table := 'PA_PROJECTS_ALL';
1029: fnd_message.set_name('PSP','PSP_TR_VALUE_NOT_FOUND');
1030: fnd_message.set_token('VALUE',l_value);

Line 1046: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;

1042: SELECT full_name
1043: INTO l_employee_name
1044: FROM per_people_f
1045: WHERE person_id = l_person_id
1046: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;
1047: l_value := 'Project Id = ' || TO_CHAR(l_or_project_id);
1048: l_table := 'PA_PROJECTS_ALL';
1049: fnd_message.set_name('PSP','PSP_ORG_VALUE_NOT_FOUND');
1050: fnd_message.set_token('VALUE',l_value);

Line 1066: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;

1062: SELECT full_name
1063: INTO l_employee_name
1064: FROM per_people_f
1065: WHERE person_id = l_person_id
1066: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;
1067: l_value := 'TaskId = ' || TO_CHAR(l_or_task_id);
1068: l_table := 'PA_TASKS';
1069: fnd_message.set_name('PSP','PSP_TR_VALUE_NOT_FOUND');
1070: fnd_message.set_token('VALUE',l_value);

Line 1087: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;

1083: SELECT full_name
1084: INTO l_employee_name
1085: FROM per_people_f
1086: WHERE person_id = l_person_id
1087: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;
1088: l_value := 'Award Id = ' || TO_CHAR(l_or_award_id);
1089: l_table := 'GMS_AWARDS_ALL';
1090: fnd_message.set_name('PSP','PSP_TR_VALUE_NOT_FOUND');
1091: fnd_message.set_token('VALUE',l_value);

Line 1108: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;

1104: SELECT full_name
1105: INTO l_employee_name
1106: FROM per_people_f
1107: WHERE person_id = l_person_id
1108: AND g_pay_costs_rec.date_earned BETWEEN effective_start_date AND effective_end_date;
1109: l_value := 'Expenditure Type = ' || l_or_expenditure_type;
1110: l_table := 'PA_EXPENDITURE_TYPES';
1111: fnd_message.set_name('PSP','PSP_TR_VALUE_NOT_FOUND');
1112: fnd_message.set_token('VALUE',l_value);

Line 1123: if g_pay_costs_rec.time_period_id <> nvl(l_prev_time_period_id, -1) OR

1119: CLOSE expenditure_type_cur;
1120: END IF;
1121:
1122: --- recreate the calendar for reversal time period
1123: if g_pay_costs_rec.time_period_id <> nvl(l_prev_time_period_id, -1) OR
1124: g_start_date <> l_prev_start_date OR
1125: g_end_date <> l_prev_end_date
1126: then
1127: hr_utility.trace(' CHANGE IN TIME PERIOD ');

Line 1128: l_prev_time_period_id := g_pay_costs_rec.time_period_id;

1124: g_start_date <> l_prev_start_date OR
1125: g_end_date <> l_prev_end_date
1126: then
1127: hr_utility.trace(' CHANGE IN TIME PERIOD ');
1128: l_prev_time_period_id := g_pay_costs_rec.time_period_id;
1129: l_prev_start_date := g_start_date;
1130: l_prev_end_date := g_end_date;
1131:
1132: -- Create an working calander (array) for this transaction.

Line 1136: -- moved the calendar code inside the get_pay_costs cursor for handling of payroll reversals

1132: -- Create an working calander (array) for this transaction.
1133: -- Array contains no of rows that is equal to no. of days that payroll period has.
1134: -- Each row will have either 'Y' if that day is working day or 'N' if
1135: -- that day is non-working day
1136: -- moved the calendar code inside the get_pay_costs cursor for handling of payroll reversals
1137: -- CREATE_WORKING_CALENDAR;
1138: create_working_calendar(l_assignment_id);
1139: g_no_of_person_work_days := g_no_of_work_days;
1140:

Line 1179: if (g_pay_costs_rec.time_period_id = time_period_id_a(i)

1175:
1176: for i in 1..time_period_id_a.count
1177: loop
1178: hr_utility.trace(' KKKK='||i);
1179: if (g_pay_costs_rec.time_period_id = time_period_id_a(i)
1180: AND g_pay_costs_rec.output_currency_code = currency_code_a(i)) -- Bug 6468271
1181: then
1182: hr_utility.trace(' KXyy='||i);
1183: l_export_id := payroll_control_id_a(i);

Line 1180: AND g_pay_costs_rec.output_currency_code = currency_code_a(i)) -- Bug 6468271

1176: for i in 1..time_period_id_a.count
1177: loop
1178: hr_utility.trace(' KKKK='||i);
1179: if (g_pay_costs_rec.time_period_id = time_period_id_a(i)
1180: AND g_pay_costs_rec.output_currency_code = currency_code_a(i)) -- Bug 6468271
1181: then
1182: hr_utility.trace(' KXyy='||i);
1183: l_export_id := payroll_control_id_a(i);
1184: hr_utility.trace(' KXzy='||i);

Line 1198: hr_utility.trace(' Found cost record Cost_id, costed_value =' ||g_pay_costs_rec.cost_id||','||g_pay_costs_rec.costed_value);

1194: end;
1195: hr_utility.trace(' AFTER SET l_export_id');
1196: end if;
1197:
1198: hr_utility.trace(' Found cost record Cost_id, costed_value =' ||g_pay_costs_rec.cost_id||','||g_pay_costs_rec.costed_value);
1199: -- Bug 1994421 : Zero Work Days Build - Assigned values to variables for processing non active assignments -lveerubh
1200: g_non_active_flag := 'N';
1201: g_hire_zero_Work_days := 'N';
1202: g_all_holiday_zero_work_days := 'N';

Line 1207: X_COSTED_VALUE => g_pay_costs_rec.costed_value,

1203: /* New procedure added for continuing if zero work days :- Caltech, Yale :- subha */
1204:
1205: /*IF ((g_entry_date_earned IS NULL) or (g_ignore_date_earned = 'Y')) THEN -- Bug 6046087*/ --6779790
1206: CHECK_ZERO_WORK_DAYS( X_ASSIGNMENT_ID => l_assignment_id,
1207: X_COSTED_VALUE => g_pay_costs_rec.costed_value,
1208: x_start_date => TRUNC(g_start_date), --Bug 6046087
1209: x_end_date => TRUNC(g_end_date), --Bug 6046087
1210: X_RETURN_STATUS => l_return_status);
1211:

Line 1233: hr_utility.trace(' l_prev_currency_code, g_pay_costs_rec.output_currency_code = '||l_prev_currency_code||','||

1229: hr_utility.trace(' l_counter = '||l_counter);
1230: IF l_counter > 0 then
1231: -- Introduced for bug fix 2916848
1232:
1233: hr_utility.trace(' l_prev_currency_code, g_pay_costs_rec.output_currency_code = '||l_prev_currency_code||','||
1234: g_pay_costs_rec.output_currency_code);
1235: IF nvl(l_prev_currency_code,g_pay_costs_rec.output_currency_code) <> g_pay_costs_rec.output_currency_code THEN
1236: l_prev_currency_code := g_pay_costs_rec.output_currency_code;
1237: l_export_id := NULL;

Line 1234: g_pay_costs_rec.output_currency_code);

1230: IF l_counter > 0 then
1231: -- Introduced for bug fix 2916848
1232:
1233: hr_utility.trace(' l_prev_currency_code, g_pay_costs_rec.output_currency_code = '||l_prev_currency_code||','||
1234: g_pay_costs_rec.output_currency_code);
1235: IF nvl(l_prev_currency_code,g_pay_costs_rec.output_currency_code) <> g_pay_costs_rec.output_currency_code THEN
1236: l_prev_currency_code := g_pay_costs_rec.output_currency_code;
1237: l_export_id := NULL;
1238: FOR i IN 1..r_payroll_control_array.r_payroll_control_id.COUNT

Line 1235: IF nvl(l_prev_currency_code,g_pay_costs_rec.output_currency_code) <> g_pay_costs_rec.output_currency_code THEN

1231: -- Introduced for bug fix 2916848
1232:
1233: hr_utility.trace(' l_prev_currency_code, g_pay_costs_rec.output_currency_code = '||l_prev_currency_code||','||
1234: g_pay_costs_rec.output_currency_code);
1235: IF nvl(l_prev_currency_code,g_pay_costs_rec.output_currency_code) <> g_pay_costs_rec.output_currency_code THEN
1236: l_prev_currency_code := g_pay_costs_rec.output_currency_code;
1237: l_export_id := NULL;
1238: FOR i IN 1..r_payroll_control_array.r_payroll_control_id.COUNT
1239: LOOP

Line 1236: l_prev_currency_code := g_pay_costs_rec.output_currency_code;

1232:
1233: hr_utility.trace(' l_prev_currency_code, g_pay_costs_rec.output_currency_code = '||l_prev_currency_code||','||
1234: g_pay_costs_rec.output_currency_code);
1235: IF nvl(l_prev_currency_code,g_pay_costs_rec.output_currency_code) <> g_pay_costs_rec.output_currency_code THEN
1236: l_prev_currency_code := g_pay_costs_rec.output_currency_code;
1237: l_export_id := NULL;
1238: FOR i IN 1..r_payroll_control_array.r_payroll_control_id.COUNT
1239: LOOP
1240: IF (r_payroll_control_array.r_currency_code(i) = l_prev_currency_code) THEN

Line 1254: IF (g_pay_costs_rec.output_currency_code = g_bg_currency_code AND

1250: END LOOP;
1251: END IF;
1252:
1253: -- Introduced the following for bug fix 3107800
1254: IF (g_pay_costs_rec.output_currency_code = g_bg_currency_code AND
1255: g_bg_currency_code = g_sob_currency_code) THEN
1256: l_exchange_rate_type := NULL;
1257: ELSE
1258: l_exchange_rate_type := g_exchange_rate_type;

Line 1282: psp_general.get_currency_precision(g_pay_costs_rec.output_currency_code,

1278:
1279: l_total_num_rec:= l_total_num_rec + 1;
1280: l_cur_rec:= l_total_num_rec;
1281:
1282: psp_general.get_currency_precision(g_pay_costs_rec.output_currency_code,
1283: g_precision,
1284: g_ext_precision);
1285:
1286: r_payroll_control_array.r_currency_code(l_cur_rec) := g_pay_costs_rec.output_currency_code;

Line 1286: r_payroll_control_array.r_currency_code(l_cur_rec) := g_pay_costs_rec.output_currency_code;

1282: psp_general.get_currency_precision(g_pay_costs_rec.output_currency_code,
1283: g_precision,
1284: g_ext_precision);
1285:
1286: r_payroll_control_array.r_currency_code(l_cur_rec) := g_pay_costs_rec.output_currency_code;
1287:
1288: r_payroll_control_array.r_payroll_control_id(l_cur_rec) := l_export_id;
1289:
1290: r_payroll_control_array.r_tot_dr(l_cur_rec) := 0;

Line 1298: l_prev_currency_code := g_pay_costs_rec.output_currency_code;

1294: r_payroll_control_array.r_precision(l_cur_rec):= g_precision;
1295: r_payroll_control_array.r_ext_precision(l_cur_rec):=g_ext_precision;
1296:
1297:
1298: l_prev_currency_code := g_pay_costs_rec.output_currency_code;
1299:
1300:
1301: PSP_PAYROLL_CONTROLS_PKG.INSERT_ROW(
1302: X_ROWID => x_rowid,

Line 1308: X_TIME_PERIOD_ID => g_pay_costs_rec.time_period_id,

1304: X_PAYROLL_ACTION_ID => g_payroll_asg_rec.payroll_action_id,
1305: X_PAYROLL_SOURCE_CODE => l_payroll_source,
1306: X_SOURCE_TYPE => 'O',
1307: X_PAYROLL_ID => l_payroll_id,
1308: X_TIME_PERIOD_ID => g_pay_costs_rec.time_period_id,
1309: X_BATCH_NAME => NULL,
1310: X_NUMBER_OF_CR => 0,
1311: X_NUMBER_OF_DR => 0,
1312: X_TOTAL_DR_AMOUNT => 0,

Line 1332: x_currency_code => g_pay_costs_rec.output_currency_code,

1328: X_GL_PHASE => NULL,
1329: X_GMS_PHASE => NULL,
1330: X_ADJ_SUM_BATCH_NAME => NULL,
1331: -- Introduced the following for bug fix 2916848
1332: x_currency_code => g_pay_costs_rec.output_currency_code,
1333: x_exchange_rate_type => null,
1334: x_parent_payroll_control_id => l_parent_control_id); --- exch rate =null for 3108109
1335:
1336: l_array_count := nvl(time_period_id_a.count,0) + 1;

Line 1337: time_period_id_a(l_array_count) := g_pay_costs_rec.time_period_id;

1333: x_exchange_rate_type => null,
1334: x_parent_payroll_control_id => l_parent_control_id); --- exch rate =null for 3108109
1335:
1336: l_array_count := nvl(time_period_id_a.count,0) + 1;
1337: time_period_id_a(l_array_count) := g_pay_costs_rec.time_period_id;
1338: payroll_control_id_a(l_array_count ) := l_export_id;
1339: currency_code_a(l_array_count) := g_pay_costs_rec.output_currency_code; -- Bug 6468271
1340:
1341: update psp_payroll_controls

Line 1339: currency_code_a(l_array_count) := g_pay_costs_rec.output_currency_code; -- Bug 6468271

1335:
1336: l_array_count := nvl(time_period_id_a.count,0) + 1;
1337: time_period_id_a(l_array_count) := g_pay_costs_rec.time_period_id;
1338: payroll_control_id_a(l_array_count ) := l_export_id;
1339: currency_code_a(l_array_count) := g_pay_costs_rec.output_currency_code; -- Bug 6468271
1340:
1341: update psp_payroll_controls
1342: set run_id = l_run_id
1343: where payroll_control_id = l_export_id;

Line 1354: P_COST_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,

1350:
1351: PSP_GENERAL.GET_GL_CCID(
1352: P_PAYROLL_ID => l_payroll_id,
1353: P_SET_OF_BOOKS_ID => l_resp_set_of_books_id,
1354: P_COST_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1355: X_GL_CCID => l_gl_ccid);
1356:
1357: IF l_gl_ccid = 0 or l_gl_ccid IS NULL then
1358: l_error_api_name := 'GET_GL_CCID : ';

Line 1360: fnd_message.set_token('COST_ID', g_pay_costs_rec.cost_allocation_keyflex_id);

1356:
1357: IF l_gl_ccid = 0 or l_gl_ccid IS NULL then
1358: l_error_api_name := 'GET_GL_CCID : ';
1359: fnd_message.set_name('PSP','PSP_NO_GL_FOR_COSTING');
1360: fnd_message.set_token('COST_ID', g_pay_costs_rec.cost_allocation_keyflex_id);
1361: fnd_msg_pub.add;
1362: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1363: ELSIF l_gl_ccid <> l_clearing_account then
1364: l_gl_value := psp_general.get_gl_values(l_resp_set_of_books_id, l_gl_ccid);

Line 1371: hr_utility.trace(' fail kff ='|| g_pay_costs_rec.cost_allocation_keyflex_id);

1367: fnd_message.set_name('PSP','PSP_CLEARING_ACCT_MISMATCH');
1368: fnd_message.set_token('GL_ACCOUNT', l_gl_value);
1369: fnd_message.set_token('CLEARING', l_clearing_account_value);
1370: fnd_msg_pub.add;
1371: hr_utility.trace(' fail kff ='|| g_pay_costs_rec.cost_allocation_keyflex_id);
1372: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1373: END IF;
1374: hr_utility.trace(' pass kff ='|| g_pay_costs_rec.cost_allocation_keyflex_id);
1375:

Line 1374: hr_utility.trace(' pass kff ='|| g_pay_costs_rec.cost_allocation_keyflex_id);

1370: fnd_msg_pub.add;
1371: hr_utility.trace(' fail kff ='|| g_pay_costs_rec.cost_allocation_keyflex_id);
1372: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1373: END IF;
1374: hr_utility.trace(' pass kff ='|| g_pay_costs_rec.cost_allocation_keyflex_id);
1375:
1376: SELECT PSP_PAYROLL_LINES_S.NEXTVAL into l_line_id
1377: FROM DUAL;
1378: x_rowid := NULL;

Line 1383: l_gms_posting_date := g_pay_costs_rec.date_earned;

1379:
1380: -- intro this IF-ENDIF and changed the next IF stmt to check gms_posting_date for 2426343
1381: If g_non_active_flag = 'Y' then
1382: -- date earned will be the max date any child sub line can take as effective date.
1383: l_gms_posting_date := g_pay_costs_rec.date_earned;
1384: psp_general.get_gms_effective_date(l_person_id, l_gms_posting_date);
1385:
1386: IF l_gms_posting_date is null then
1387: select distinct substr(full_name,1,50)

Line 1391: g_pay_costs_rec.date_earned between effective_start_date and effective_end_date;

1387: select distinct substr(full_name,1,50)
1388: into l_employee_name
1389: from per_people_f
1390: where person_id = l_person_id and
1391: g_pay_costs_rec.date_earned between effective_start_date and effective_end_date;
1392: FND_MESSAGE.Set_Name('PSP', 'PSP_PI_PRMRY_ASG_INACTIVE');
1393: FND_MESSAGE.set_token('Employee',l_employee_name);
1394: FND_MSG_PUB.ADD;
1395: g_non_active_flag := 'E'; --ERROR, skip this assg, bcos not a single day it is active

Line 1417: X_COST_ID => g_pay_costs_rec.cost_id,

1413: X_PAYROLL_CONTROL_ID => l_export_id ,
1414: X_SET_OF_BOOKS_ID => l_resp_set_of_books_id ,
1415: X_ASSIGNMENT_ID => l_assignment_id ,
1416: X_PERSON_ID => l_person_id ,
1417: X_COST_ID => g_pay_costs_rec.cost_id,
1418: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1419: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,
1420: X_STATUS_CODE => l_status_code ,
1421: X_EFFECTIVE_DATE => g_payroll_asg_rec.accounting_date,

Line 1418: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,

1414: X_SET_OF_BOOKS_ID => l_resp_set_of_books_id ,
1415: X_ASSIGNMENT_ID => l_assignment_id ,
1416: X_PERSON_ID => l_person_id ,
1417: X_COST_ID => g_pay_costs_rec.cost_id,
1418: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1419: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,
1420: X_STATUS_CODE => l_status_code ,
1421: X_EFFECTIVE_DATE => g_payroll_asg_rec.accounting_date,
1422: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for

Line 1419: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,

1415: X_ASSIGNMENT_ID => l_assignment_id ,
1416: X_PERSON_ID => l_person_id ,
1417: X_COST_ID => g_pay_costs_rec.cost_id,
1418: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1419: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,
1420: X_STATUS_CODE => l_status_code ,
1421: X_EFFECTIVE_DATE => g_payroll_asg_rec.accounting_date,
1422: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for
1423: X_EXCHANGE_RATE_TYPE => l_exchange_rate_type, -- 3108109

Line 1425: X_EARNED_DATE => g_pay_costs_rec.date_earned,

1421: X_EFFECTIVE_DATE => g_payroll_asg_rec.accounting_date,
1422: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for
1423: X_EXCHANGE_RATE_TYPE => l_exchange_rate_type, -- 3108109
1424: X_CHECK_DATE => g_payroll_asg_rec.pay_advice_date,
1425: X_EARNED_DATE => g_pay_costs_rec.date_earned,
1426: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1427: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1428: X_BALANCE_AMOUNT => l_balance_amount,
1429: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,

Line 1426: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,

1422: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for
1423: X_EXCHANGE_RATE_TYPE => l_exchange_rate_type, -- 3108109
1424: X_CHECK_DATE => g_payroll_asg_rec.pay_advice_date,
1425: X_EARNED_DATE => g_pay_costs_rec.date_earned,
1426: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1427: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1428: X_BALANCE_AMOUNT => l_balance_amount,
1429: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,
1430: X_MODE => 'R',

Line 1429: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,

1425: X_EARNED_DATE => g_pay_costs_rec.date_earned,
1426: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1427: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1428: X_BALANCE_AMOUNT => l_balance_amount,
1429: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,
1430: X_MODE => 'R',
1431: X_PAYROLL_ACTION_TYPE => g_pay_costs_rec.action_type,
1432: X_OR_GL_CODE_COMBINATION_ID => l_or_gl_ccid,
1433: X_OR_PROJECT_ID => l_or_project_id,

Line 1431: X_PAYROLL_ACTION_TYPE => g_pay_costs_rec.action_type,

1427: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1428: X_BALANCE_AMOUNT => l_balance_amount,
1429: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,
1430: X_MODE => 'R',
1431: X_PAYROLL_ACTION_TYPE => g_pay_costs_rec.action_type,
1432: X_OR_GL_CODE_COMBINATION_ID => l_or_gl_ccid,
1433: X_OR_PROJECT_ID => l_or_project_id,
1434: X_OR_TASK_ID => l_or_task_id,
1435: X_OR_AWARD_ID => l_or_award_id,

Line 1442: IF g_pay_costs_rec.debit_or_credit = 'D' then

1438:
1439: -- The following code is required as psp_payroll_controls will be updated with the total debit and credit amount
1440:
1441:
1442: IF g_pay_costs_rec.debit_or_credit = 'D' then
1443: r_payroll_control_array.r_tot_dr(l_cur_rec)
1444: := r_payroll_control_array.r_tot_dr(l_cur_rec) +1;
1445:
1446: r_payroll_control_array.r_dr_amount(l_cur_rec) :=

Line 1447: r_payroll_control_array.r_dr_amount(l_cur_rec) + g_pay_costs_rec.costed_value;

1443: r_payroll_control_array.r_tot_dr(l_cur_rec)
1444: := r_payroll_control_array.r_tot_dr(l_cur_rec) +1;
1445:
1446: r_payroll_control_array.r_dr_amount(l_cur_rec) :=
1447: r_payroll_control_array.r_dr_amount(l_cur_rec) + g_pay_costs_rec.costed_value;
1448:
1449: ELSE
1450: r_payroll_control_array.r_tot_cr(l_cur_rec)
1451: := r_payroll_control_array.r_tot_cr(l_cur_rec) +1;

Line 1454: r_payroll_control_array.r_cr_amount(l_cur_rec) + g_pay_costs_rec.costed_value;

1450: r_payroll_control_array.r_tot_cr(l_cur_rec)
1451: := r_payroll_control_array.r_tot_cr(l_cur_rec) +1;
1452:
1453: r_payroll_control_array.r_cr_amount(l_cur_rec) :=
1454: r_payroll_control_array.r_cr_amount(l_cur_rec) + g_pay_costs_rec.costed_value;
1455:
1456: END IF;
1457:
1458: -- write single sub-line in PSP_PAYROLL_SUB_LINES

Line 1489: X_COST_ID => g_pay_costs_rec.cost_id,

1485: X_PAYROLL_CONTROL_ID => l_export_id ,
1486: X_SET_OF_BOOKS_ID => l_resp_set_of_books_id ,
1487: X_ASSIGNMENT_ID => l_assignment_id ,
1488: X_PERSON_ID => l_person_id ,
1489: X_COST_ID => g_pay_costs_rec.cost_id,
1490: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1491: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,
1492: X_STATUS_CODE => l_status_code ,
1493: X_EFFECTIVE_DATE => g_payroll_asg_rec.effective_date,

Line 1490: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,

1486: X_SET_OF_BOOKS_ID => l_resp_set_of_books_id ,
1487: X_ASSIGNMENT_ID => l_assignment_id ,
1488: X_PERSON_ID => l_person_id ,
1489: X_COST_ID => g_pay_costs_rec.cost_id,
1490: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1491: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,
1492: X_STATUS_CODE => l_status_code ,
1493: X_EFFECTIVE_DATE => g_payroll_asg_rec.effective_date,
1494: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for

Line 1491: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,

1487: X_ASSIGNMENT_ID => l_assignment_id ,
1488: X_PERSON_ID => l_person_id ,
1489: X_COST_ID => g_pay_costs_rec.cost_id,
1490: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1491: X_PAY_AMOUNT => g_pay_costs_rec.costed_value ,
1492: X_STATUS_CODE => l_status_code ,
1493: X_EFFECTIVE_DATE => g_payroll_asg_rec.effective_date,
1494: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for
1495: X_EXCHANGE_RATE_TYPE => l_exchange_rate_type, -- 3108109

Line 1497: X_EARNED_DATE => g_pay_costs_rec.date_earned,

1493: X_EFFECTIVE_DATE => g_payroll_asg_rec.effective_date,
1494: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for
1495: X_EXCHANGE_RATE_TYPE => l_exchange_rate_type, -- 3108109
1496: X_CHECK_DATE => g_payroll_asg_rec.pay_advice_date,
1497: X_EARNED_DATE => g_pay_costs_rec.date_earned,
1498: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1499: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1500: X_BALANCE_AMOUNT => l_balance_amount,
1501: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,

Line 1498: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,

1494: X_ACCOUNTING_DATE => g_payroll_asg_rec.accounting_date, --added for
1495: X_EXCHANGE_RATE_TYPE => l_exchange_rate_type, -- 3108109
1496: X_CHECK_DATE => g_payroll_asg_rec.pay_advice_date,
1497: X_EARNED_DATE => g_pay_costs_rec.date_earned,
1498: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1499: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1500: X_BALANCE_AMOUNT => l_balance_amount,
1501: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,
1502: X_MODE => 'R',

Line 1501: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,

1497: X_EARNED_DATE => g_pay_costs_rec.date_earned,
1498: X_COST_ALLOCATION_KEYFLEX_ID => g_pay_costs_rec.cost_allocation_keyflex_id,
1499: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1500: X_BALANCE_AMOUNT => l_balance_amount,
1501: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,
1502: X_MODE => 'R',
1503: X_PAYROLL_ACTION_TYPE => g_pay_costs_rec.action_type,
1504: X_OR_GL_CODE_COMBINATION_ID => l_or_gl_ccid,
1505: X_OR_PROJECT_ID => l_or_project_id,

Line 1503: X_PAYROLL_ACTION_TYPE => g_pay_costs_rec.action_type,

1499: X_GL_CODE_COMBINATION_ID => l_gl_ccid,
1500: X_BALANCE_AMOUNT => l_balance_amount,
1501: X_DR_CR_FLAG => g_pay_costs_rec.debit_or_credit,
1502: X_MODE => 'R',
1503: X_PAYROLL_ACTION_TYPE => g_pay_costs_rec.action_type,
1504: X_OR_GL_CODE_COMBINATION_ID => l_or_gl_ccid,
1505: X_OR_PROJECT_ID => l_or_project_id,
1506: X_OR_TASK_ID => l_or_task_id,
1507: X_OR_AWARD_ID => l_or_award_id,

Line 1511: -- IF (l_proration_option = 'PSP' or g_pay_costs_rec.start_date IS NULL) THEN -- Introduced for bug fix 2916848

1507: X_OR_AWARD_ID => l_or_award_id,
1508: X_OR_EXPENDITURE_ORG_ID => l_or_expenditure_org_id,
1509: X_OR_EXPENDITURE_TYPE => l_or_expenditure_type);
1510:
1511: -- IF (l_proration_option = 'PSP' or g_pay_costs_rec.start_date IS NULL) THEN -- Introduced for bug fix 2916848
1512:
1513: ---IF g_pay_costs_rec.start_date IS NULL THEN ... commented for 4897071
1514:
1515:

Line 1513: ---IF g_pay_costs_rec.start_date IS NULL THEN ... commented for 4897071

1509: X_OR_EXPENDITURE_TYPE => l_or_expenditure_type);
1510:
1511: -- IF (l_proration_option = 'PSP' or g_pay_costs_rec.start_date IS NULL) THEN -- Introduced for bug fix 2916848
1512:
1513: ---IF g_pay_costs_rec.start_date IS NULL THEN ... commented for 4897071
1514:
1515:
1516: CREATE_DAILY_RATE_CALENDAR(
1517: X_ASSIGNMENT_ID => l_assignment_id,

Line 1519: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,

1515:
1516: CREATE_DAILY_RATE_CALENDAR(
1517: X_ASSIGNMENT_ID => l_assignment_id,
1518: X_time_period_id => p_time_period_id,
1519: X_ELEMENT_TYPE_ID => g_pay_costs_rec.element_type_id,
1520: X_RETURN_STATUS => l_return_status);
1521: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
1522: l_error_api_name := 'CREATE_DAILY_RATE_CALENDAR : ';
1523: raise FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1528: -- compare the salary amount we got from pay costs table

1524: END IF;
1525:
1526:
1527: -- Sum up the salary from daily calendar array
1528: -- compare the salary amount we got from pay costs table
1529: -- if it is different, calculate the difference amount
1530:
1531: CALCULATE_BALANCE_AMOUNT(X_PAY_AMOUNT => g_pay_costs_rec.costed_value,
1532: X_BALANCE_AMOUNT => l_balance_amount,

Line 1531: CALCULATE_BALANCE_AMOUNT(X_PAY_AMOUNT => g_pay_costs_rec.costed_value,

1527: -- Sum up the salary from daily calendar array
1528: -- compare the salary amount we got from pay costs table
1529: -- if it is different, calculate the difference amount
1530:
1531: CALCULATE_BALANCE_AMOUNT(X_PAY_AMOUNT => g_pay_costs_rec.costed_value,
1532: X_BALANCE_AMOUNT => l_balance_amount,
1533: X_RETURN_STATUS => l_return_status);
1534: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
1535: l_error_api_name := 'CREATE_BALANCE_AMOUNT : ';

Line 1544: (p_start_date => g_pay_costs_rec.start_date,

1540: /* commented for 4897071
1541: -- Introduced the following for bug fix 2916848
1542: ELSE
1543: create_prorate_calendar
1544: (p_start_date => g_pay_costs_rec.start_date,
1545: p_end_date => g_pay_costs_rec.end_date,
1546: p_pay_amount => g_pay_costs_rec.costed_value,
1547: p_payroll_line_id => l_line_id,
1548: p_balance_amount => l_balance_amount,

Line 1545: p_end_date => g_pay_costs_rec.end_date,

1541: -- Introduced the following for bug fix 2916848
1542: ELSE
1543: create_prorate_calendar
1544: (p_start_date => g_pay_costs_rec.start_date,
1545: p_end_date => g_pay_costs_rec.end_date,
1546: p_pay_amount => g_pay_costs_rec.costed_value,
1547: p_payroll_line_id => l_line_id,
1548: p_balance_amount => l_balance_amount,
1549: p_return_status => l_return_status);

Line 1546: p_pay_amount => g_pay_costs_rec.costed_value,

1542: ELSE
1543: create_prorate_calendar
1544: (p_start_date => g_pay_costs_rec.start_date,
1545: p_end_date => g_pay_costs_rec.end_date,
1546: p_pay_amount => g_pay_costs_rec.costed_value,
1547: p_payroll_line_id => l_line_id,
1548: p_balance_amount => l_balance_amount,
1549: p_return_status => l_return_status);
1550: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 1563: IF g_pay_costs_rec.debit_or_credit = 'D' then

1559: UPDATE PSP_PAYROLL_LINES set balance_amount=l_balance_amount where payroll_line_id=l_line_id;
1560:
1561: -- End of bug fix 2916848
1562:
1563: IF g_pay_costs_rec.debit_or_credit = 'D' then
1564:
1565: r_payroll_control_array.r_tot_dr(l_cur_rec):=
1566: r_payroll_control_array.r_tot_dr(l_cur_rec) +1;
1567: r_payroll_control_array.r_dr_amount(l_cur_rec) :=

Line 1569: g_pay_costs_rec.costed_value;

1565: r_payroll_control_array.r_tot_dr(l_cur_rec):=
1566: r_payroll_control_array.r_tot_dr(l_cur_rec) +1;
1567: r_payroll_control_array.r_dr_amount(l_cur_rec) :=
1568: r_payroll_control_array.r_dr_amount(l_cur_rec) +
1569: g_pay_costs_rec.costed_value;
1570:
1571: ELSE
1572:
1573: r_payroll_control_array.r_tot_cr(l_cur_rec):=

Line 1578: g_pay_costs_rec.costed_value;

1574: r_payroll_control_array.r_tot_cr(l_cur_rec) +1;
1575:
1576: r_payroll_control_array.r_cr_amount(l_cur_rec) :=
1577: r_payroll_control_array.r_cr_amount(l_cur_rec) +
1578: g_pay_costs_rec.costed_value;
1579:
1580: END IF;
1581:
1582: -- If salary change happens during the payroll period

Line 1590: --- IF (l_proration_option = 'PSP' or g_pay_costs_rec.start_date is null ) THEN -- Introduced for bug fix 2916848

1586: -- write single sub-line in PSP_PAYROLL_SUB_LINES
1587: -- table
1588: -- end if;
1589:
1590: --- IF (l_proration_option = 'PSP' or g_pay_costs_rec.start_date is null ) THEN -- Introduced for bug fix 2916848
1591:
1592: --- IF g_pay_costs_rec.start_date IS NULL then .. commented for 4897071
1593: /*Bug 5642002: Added parameters x_start_date and x_end_date */
1594: CREATE_SLINE_SALARY_CHANGE (X_PAYROLL_LINE_ID => l_line_id,

Line 1592: --- IF g_pay_costs_rec.start_date IS NULL then .. commented for 4897071

1588: -- end if;
1589:
1590: --- IF (l_proration_option = 'PSP' or g_pay_costs_rec.start_date is null ) THEN -- Introduced for bug fix 2916848
1591:
1592: --- IF g_pay_costs_rec.start_date IS NULL then .. commented for 4897071
1593: /*Bug 5642002: Added parameters x_start_date and x_end_date */
1594: CREATE_SLINE_SALARY_CHANGE (X_PAYROLL_LINE_ID => l_line_id,
1595: x_start_date => TRUNC(g_start_date), -- Bug 6046087
1596: x_end_date => TRUNC(g_end_date), -- Bug 6046087

Line 1761: if (NVL(to_number(g_pay_costs_rec.costed_value),0) - NVL(l_subline_sum,0)) <> 0 then

1757: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1758: end if;
1759: close get_difference_csr;
1760: -- Added daily rate not equal to 0 to where clause to fix bug no 89157
1761: if (NVL(to_number(g_pay_costs_rec.costed_value),0) - NVL(l_subline_sum,0)) <> 0 then
1762: update psp_payroll_sub_lines
1763: set pay_amount = pay_amount + (NVL(to_number(g_pay_costs_rec.costed_value),0) - NVL(l_subline_sum,0))
1764: where payroll_line_id = l_line_id and
1765: NVL(daily_rate,0) <> 0 and

Line 1763: set pay_amount = pay_amount + (NVL(to_number(g_pay_costs_rec.costed_value),0) - NVL(l_subline_sum,0))

1759: close get_difference_csr;
1760: -- Added daily rate not equal to 0 to where clause to fix bug no 89157
1761: if (NVL(to_number(g_pay_costs_rec.costed_value),0) - NVL(l_subline_sum,0)) <> 0 then
1762: update psp_payroll_sub_lines
1763: set pay_amount = pay_amount + (NVL(to_number(g_pay_costs_rec.costed_value),0) - NVL(l_subline_sum,0))
1764: where payroll_line_id = l_line_id and
1765: NVL(daily_rate,0) <> 0 and
1766: pay_amount <> 0 and --- rounding difference to nonzero amount .. 4670588
1767: rownum = 1;

Line 1789: close get_pay_costs_csr;

1785: retcode:= FND_API.G_RET_STS_SUCCESS;
1786:
1787: END;
1788: END LOOP; -- LOOP1 end
1789: close get_pay_costs_csr;
1790:
1791: EXCEPTION
1792:
1793: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then

Line 1804: close get_pay_costs_csr;

1800: );
1801:
1802: return;
1803: WHEN NO_DATA_FOUND then
1804: close get_pay_costs_csr;
1805: select distinct substr(full_name,1,50) into l_employee_name from per_people_f
1806: --where person_id = l_person_id; /* Tar#12269298 WVU */
1807: where person_id = l_person_id and
1808: effective_start_date = (select max(effective_start_date ) from per_people_f where