[Home] [Help]
PACKAGE: APPS.PAY_FR_PAY_FILE
Source
1 package pay_fr_pay_file AUTHID CURRENT_USER as
2 /* $Header: pyfrpfcr.pkh 115.4 2002/10/15 18:28:20 aparkes ship $
3 **
4 ** Copyright (c) 2000 Oracle Corporation
5 ** All Rights Reserved
6 **
7 ** French Payment Output File
8 **
9 ** Change List
10 ** ===========
11 **
12 ** Date Author Version Bug Description
13 ** -----------+--------+-------+--------+-----------------------------
14 ** 22 Nov 2001 anprasad Created
15 ** 19 Feb 2002 khicks 2231637 added dbdrv lines
16 ** 15 Oct 2002 aparkes 115.4 2610927 Cursor changes
17 */
18
19
20 level_cnt number;
21
22 /********************************************************
23 * Cursor to fetch header record information *
24 ********************************************************/
25
26
27 cursor fr_payfile_header is
28 select 'TRANSFER_PROCESS_DATE=P', /* Input parameter */
29 to_char(ppa.overriding_dd_date, 'DD/MM/YYYY'),
30 'DATE_EARNED=C', /* Context value for DB items */
31 to_char(ppa.effective_date, 'YYYY/MM/DD HH24:MI:SS'),
32 'ORG_PAY_METHOD_ID=C', /* Context value for DB items */
33 ppa.org_payment_method_id,
34 'BUSINESS_GROUP_ID=C', ppa.business_group_id
35 from pay_payroll_actions ppa
36 where ppa.payroll_action_id =
37 pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID');
38
39
40 /********************************************************
41 * Cursor to fetch body record information *
42 ********************************************************/
43
44 cursor fr_payfile_body is
45 select 'TRANSFER_VALUE=P', /* Value for field Amount in body record */
46 ppp.value * 100,
47 'PER_PAY_METHOD_ID=C', /* Context value for DB items */
48 ppp.personal_payment_method_id,
49 'TAX_UNIT_ID=C', paa.tax_unit_id,
50 'ASSIGNMENT_ACTION_ID=P', paa.assignment_action_id
51 from per_assignments_f pa,
52 per_people_f per,
53 pay_pre_payments ppp,
54 pay_assignment_actions paa,
55 pay_payroll_actions ppa
56 where paa.payroll_action_id =
57 pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID')
58 and paa.pre_payment_id = ppp.pre_payment_id
59 and paa.payroll_action_id = ppa.payroll_action_id
60 and paa.assignment_id = pa.assignment_id
61 and pa.person_id = per.person_id
62 and ppa.effective_date between pa.effective_start_date and pa.effective_end_date
63 and ppa.effective_date between per.effective_start_date and per.effective_end_date
64 order by decode(pay_magtape_generic.get_parameter_value('SET_ORDER_BY'),
65 'NAME', per.order_name,
66 'NUMBER', per.employee_number, null);
67
68 FUNCTION get_payers_id (p_opm_id in number,
69 P_bg_id in number,
70 P_date_earned in date)
71 return varchar2;
72
73 FUNCTION valid_org (p_estab_id in number) return varchar2;
74
75 end pay_fr_pay_file;