[Home] [Help]
PACKAGE BODY: APPS.PAY_PYNZREC_XMLP_PKG
Source
1 PACKAGE BODY PAY_PYNZREC_XMLP_PKG AS
2 /* $Header: PYNZRECB.pls 120.0 2007/12/13 12:22:29 amakrish noship $ */
3
4 function AfterReport return boolean is
5 begin
6 /*srw.user_exit('FND SRWEXIT');*/null;
7
8 return (TRUE);
9 end;
10
11 function CF_business_groupFormula return VARCHAR2 is
12 v_business_group hr_all_organization_units.name%type;
13
14 begin
15 v_business_group := hr_reports.get_business_group(p_business_group_id);
16 return v_business_group;
17 end;
18
19 function CF_payroll_run_displayFormula return VARCHAR2 is
20
21 v_lookup_type fnd_lookups.lookup_type%type := 'ACTION_TYPE';
22 v_display varchar2(100) := null;
23
24 cursor payroll_run
25 (c_payroll_action_id in pay_payroll_actions.payroll_action_id%type) is
26 select pap.payroll_name || ' - ' ||
27 ptp.period_name || ' (' ||
28 fcl.meaning || ' ' ||
29 to_char(ppa.display_run_number) || ')' display
30 from pay_all_payrolls_f pap,
31 per_time_periods ptp,
32 pay_payroll_actions ppa,
33 hr_lookups fcl
34 where ppa.payroll_action_id = c_payroll_action_id
35 and pap.payroll_id = ppa.payroll_id
36 and ppa.payroll_id = ptp.payroll_id
37 and ptp.end_date = ppa.date_earned
38 and fcl.lookup_type = v_lookup_type
39 and fcl.lookup_code = ppa.action_type;
40
41 begin
42 open payroll_run (p_payroll_action_id);
43 fetch payroll_run into v_display;
44 close payroll_run;
45
46 return v_display;
47 end;
48
49 function CP_input_value_nameFormula return VARCHAR2 is
50 begin
51 return 'Pay Value';
52 end;
53
54 function CP_UOMFormula return VARCHAR2 is
55 begin
56 return 'M';
57 end;
58
59 function BeforeReport return boolean is
60 begin
61 cp_input_value_name := 'Pay Value';
62 cp_uom := 'M';
63 cp_report_name := 'PAYNZREC';
64
65 /*srw.user_exit('FND SRWINIT');*/null;
66
67 return (TRUE);
68 end;
69
70 function CF_legislation_codeFormula return VARCHAR2 is
71
72 v_legislation_code hr_organization_information.org_information9%type := null;
73
74 cursor legislation_code
75 (c_business_group_id hr_organization_information.organization_id%type) is
76
77 select org_information9
78 from hr_organization_information
79 where organization_id = c_business_group_id
80 and org_information9 is not null;
81 begin
82 open legislation_code (p_business_group_id);
83 fetch legislation_code into v_legislation_code;
84 close legislation_code;
85
86 return v_legislation_code;
87 end;
88
89 function CF_sort_order_displayFormula return VARCHAR2 is
90
91 v_lookup_type hr_lookups.lookup_type%type := 'NZ_REC_REPORT_SORT_BY';
92 v_meaning hr_lookups.meaning%type := '';
93
94 cursor lookup_meaning
95 (c_lookup_type hr_lookups.lookup_type%type,
96 c_lookup_code hr_lookups.lookup_code%type) is
97 select meaning
98 from hr_lookups
99 where lookup_type = c_lookup_type
100 and lookup_code = c_lookup_code;
101
102 begin
103 open lookup_meaning (v_lookup_type, p_sort_order);
104 fetch lookup_meaning into v_meaning;
105 close lookup_meaning;
106
107
108 return v_meaning;
109 end;
110
111 function cf_currency_format_maskformula(cf_legislation_code in varchar2) return varchar2 is
112
113 v_currency_code fnd_currencies.currency_code%type;
114 v_format_mask varchar2(100) := null;
115 v_field_length number(3) := 15;
116
117 cursor currency_format_mask
118 (c_territory_code in fnd_currencies.issuing_territory_code%type) is
119 select currency_code
120 from fnd_currencies
121 where issuing_territory_code = c_territory_code;
122
123 begin
124 open currency_format_mask (cf_legislation_code);
125 fetch currency_format_mask into v_currency_code;
126 close currency_format_mask;
127
128 v_format_mask := fnd_currency.get_format_mask(v_currency_code, v_field_length);
129
130 return v_format_mask;
131 end;
132
133 function CP_report_nameFormula return VARCHAR2 is
134 begin
135 return ('PAYNZREC');
136 end;
137
138 --Functions to refer Oracle report placeholders--
139
140 Function CP_input_value_name_p return varchar2 is
141 Begin
142 return CP_input_value_name;
143 END;
144 Function CP_UOM_p return varchar2 is
145 Begin
146 return CP_UOM;
147 END;
148 Function CP_report_name_p return varchar2 is
149 Begin
150 return CP_report_name;
151 END;
152 END PAY_PYNZREC_XMLP_PKG ;