1
|
objMain.layout = 'border';
|
2
|
|
3
|
var compgrid = new Ext.data.JsonStore({
|
4
|
fields : ['code', 'desc'],
|
5
|
method : 'GET',
|
6
|
url : "/Auth/ListCompanyID"
|
7
|
});
|
8
|
compgrid.load();
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
var yeargr = new Ext.data.ArrayStore({
|
15
|
fields: ["data"]
|
16
|
, method: 'GET'
|
17
|
, data: [["2010"],["2011"],["2012"],["2013"],["2014"],["2015"],["2016"],["2017"],["2018"],["2019"],["2020"],["2021"],["2022"],["2023"],["2024"],["2025"]]
|
18
|
});
|
19
|
|
20
|
var kppgrid = new Ext.data.JsonStore({
|
21
|
fields : ['code', 'desc'],
|
22
|
method : 'GET',
|
23
|
url : "/UserControl/DataCombo/?tableName=base_cust_ref_tax_office&value=tax_office&display=description"
|
24
|
});
|
25
|
kppgrid.load();
|
26
|
|
27
|
var empstatusgrid = new Ext.data.JsonStore({
|
28
|
fields : ['code', 'desc'],
|
29
|
method : 'GET',
|
30
|
url : "/UserControl/DataCombo/?tableName=base_cust_ref_emp_status&value=emp_status&display=description"
|
31
|
});
|
32
|
empstatusgrid.load();
|
33
|
|
34
|
var pygroupgrid = new Ext.data.JsonStore({
|
35
|
fields: ['code','desc']
|
36
|
, method: 'GET'
|
37
|
, url: "/Auth/ListPayrollGroup"
|
38
|
});
|
39
|
pygroupgrid.load();
|
40
|
|
41
|
var SearchPanel = new Ext.Panel({
|
42
|
id : program + 'idSearchPanel',
|
43
|
title : 'Report Filter',
|
44
|
region : 'north',
|
45
|
height : 250,
|
46
|
frame : true,
|
47
|
border : false,
|
48
|
split : true,
|
49
|
collapsible : true,
|
50
|
collapseMode : 'mini'
|
51
|
});
|
52
|
|
53
|
var MainPanel = new Ext.Panel({
|
54
|
id : program + 'idReportPanel',
|
55
|
region : 'center',
|
56
|
layout : 'fit'
|
57
|
});
|
58
|
|
59
|
var Searchparam = new Ext.FormPanel({
|
60
|
id : program + 'idgetparam',
|
61
|
method : 'POST',
|
62
|
bodyStyle : {
|
63
|
padding : '5px 10px 0'
|
64
|
},
|
65
|
labelWidth : 130,
|
66
|
border : false,
|
67
|
items : [
|
68
|
{
|
69
|
id: program + 'idyear'
|
70
|
, fieldLabel : 'Period Year'
|
71
|
, name: 'year'
|
72
|
, cls : 'minova-mandatory'
|
73
|
, xtype: 'combo'
|
74
|
, store: yeargr
|
75
|
, width: 90
|
76
|
, mode: 'local'
|
77
|
, triggerAction: 'all'
|
78
|
, displayField: "data"
|
79
|
, valueField: "data"
|
80
|
},
|
81
|
{
|
82
|
id : program + 'idcompcod',
|
83
|
name : 'company_code',
|
84
|
width : 150,
|
85
|
cls : 'minova-mandatory',
|
86
|
fieldLabel : 'Company Code',
|
87
|
xtype : 'combo',
|
88
|
store : compgrid,
|
89
|
mode : 'local',
|
90
|
displayField : 'desc',
|
91
|
valueField : 'code',
|
92
|
triggerAction : 'all',
|
93
|
hiddenName : 'company_code',
|
94
|
listeners : {
|
95
|
render : function() {
|
96
|
compgrid.load();
|
97
|
}
|
98
|
}
|
99
|
},
|
100
|
{
|
101
|
id: program + 'idpygroup',
|
102
|
name: 'payroll_group'
|
103
|
, width: 150
|
104
|
, fieldLabel: 'Payroll Group'
|
105
|
, xtype: 'combo'
|
106
|
, cls : 'minova-mandatory'
|
107
|
, store: pygroupgrid
|
108
|
, mode: 'local'
|
109
|
, displayField: 'desc'
|
110
|
, valueField: 'code'
|
111
|
, triggerAction: 'all'
|
112
|
, hiddenName: 'payroll_group'
|
113
|
, allowBlank: false
|
114
|
, listeners:{ render: function(){ pygroupgrid.load();}}
|
115
|
},{
|
116
|
id : program + 'idkpp',
|
117
|
name : 'tax_office',
|
118
|
width : 150,
|
119
|
fieldLabel : 'Tax Office',
|
120
|
xtype : 'combo',
|
121
|
store : kppgrid,
|
122
|
mode : 'local',
|
123
|
displayField : 'desc',
|
124
|
valueField : 'code',
|
125
|
triggerAction : 'all',
|
126
|
hiddenName : 'tax_office',
|
127
|
listeners : {
|
128
|
render : function() {
|
129
|
kppgrid.load();
|
130
|
}
|
131
|
}
|
132
|
},{
|
133
|
id : program + 'idemployee_status',
|
134
|
name : 'employee_status',
|
135
|
width : 150,
|
136
|
fieldLabel : 'Employee Status',
|
137
|
xtype : 'combo',
|
138
|
store : empstatusgrid,
|
139
|
mode : 'local',
|
140
|
displayField : 'desc',
|
141
|
valueField : 'code',
|
142
|
triggerAction : 'all',
|
143
|
hiddenName : 'employee_status',
|
144
|
listeners : {
|
145
|
render : function() {
|
146
|
empstatusgrid.load();
|
147
|
}
|
148
|
}
|
149
|
},LookUpField(program + 'emp_beg', 200, 500, 500, 'Employee ID From', 'md01', true),
|
150
|
{
|
151
|
id : program + 'emp_id_beg',
|
152
|
name : 'emp_id_beg',
|
153
|
xtype :'hidden'
|
154
|
},LookUpField(program + 'emp_end', 200, 500, 500, 'Employee ID To', 'md01', true),
|
155
|
{
|
156
|
id : program + 'emp_id_end',
|
157
|
name : 'emp_id_end',
|
158
|
xtype :'hidden'
|
159
|
},
|
160
|
{
|
161
|
id : 'txtReportID',
|
162
|
name : 'report_id',
|
163
|
xtype : 'hidden',
|
164
|
value : '1300043',
|
165
|
hiddenName : 'ReportID'
|
166
|
}],
|
167
|
bbar : [{
|
168
|
xtype : 'button',
|
169
|
text : 'View Report',
|
170
|
iconCls : 'icon-table_save',
|
171
|
handler : viewreport
|
172
|
}]
|
173
|
});
|
174
|
|
175
|
function viewreport() {
|
176
|
if (Ext.getCmp(program + 'idgetparam').getForm().isValid()) {
|
177
|
|
178
|
Ext.getCmp(program + 'emp_id_beg').setValue(LookUpGetValue(program + 'emp_beg').getValue());
|
179
|
Ext.getCmp(program + 'emp_id_end').setValue(LookUpGetValue(program + 'emp_end').getValue());
|
180
|
|
181
|
var rep_id = Ext.getCmp('txtReportID').getValue();
|
182
|
|
183
|
var htmlVal = '<iframe style="overflow:auto;width:100%;height:100%;" frameborder="0" src="/Base/ViewReportInline/'
|
184
|
+ rep_id + '"></iframe>';
|
185
|
|
186
|
var _reportBody = new Ext.Panel({
|
187
|
border : false,
|
188
|
height : 800,
|
189
|
html : htmlVal
|
190
|
});
|
191
|
|
192
|
Ext.getCmp(program + 'idgetparam').getForm().submit({
|
193
|
url : "/Base/SetParamReport",
|
194
|
success : function(form, action) {
|
195
|
|
196
|
Ext.getCmp(program + 'idReportPanel').removeAll();
|
197
|
Ext.getCmp(program + 'idReportPanel').add(_reportBody);
|
198
|
Ext.getCmp(program + 'idReportPanel').doLayout();
|
199
|
|
200
|
},
|
201
|
failure : function(form, action) {
|
202
|
|
203
|
alert("Error...");
|
204
|
|
205
|
}
|
206
|
});
|
207
|
}
|
208
|
}
|
209
|
|
210
|
SearchPanel.add(Searchparam);
|
211
|
|
212
|
objMain.add(SearchPanel);
|
213
|
objMain.add(MainPanel);
|