18 |
ilm |
1 |
/*
|
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|
|
3 |
*
|
|
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
|
|
5 |
*
|
|
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
|
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
|
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
|
|
9 |
* language governing permissions and limitations under the License.
|
|
|
10 |
*
|
|
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
package org.openconcerto.erp.core.humanresources.payroll.element;
|
|
|
15 |
|
|
|
16 |
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
|
|
|
17 |
import org.openconcerto.sql.element.BaseSQLComponent;
|
|
|
18 |
import org.openconcerto.sql.element.SQLComponent;
|
|
|
19 |
import org.openconcerto.ui.DefaultGridBagConstraints;
|
|
|
20 |
|
|
|
21 |
import java.awt.GridBagConstraints;
|
|
|
22 |
import java.awt.GridBagLayout;
|
|
|
23 |
import java.util.ArrayList;
|
|
|
24 |
import java.util.List;
|
|
|
25 |
|
|
|
26 |
import javax.swing.JLabel;
|
|
|
27 |
import javax.swing.JTextField;
|
|
|
28 |
|
|
|
29 |
public class CumulsPayeSQLElement extends ComptaSQLConfElement {
|
|
|
30 |
public CumulsPayeSQLElement() {
|
|
|
31 |
super("CUMULS_PAYE", "un cumul de paye", "cumuls de paye");
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
public List<String> getListFields() {
|
|
|
35 |
final List<String> l = new ArrayList<String>();
|
|
|
36 |
l.add("SAL_BRUT_C");
|
|
|
37 |
l.add("COT_SAL_C");
|
|
|
38 |
l.add("COT_PAT_C");
|
|
|
39 |
l.add("NET_IMP_C");
|
|
|
40 |
l.add("NET_A_PAYER_C");
|
|
|
41 |
return l;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
protected List<String> getComboFields() {
|
|
|
45 |
final List<String> l = new ArrayList<String>();
|
|
|
46 |
l.add("SAL_BRUT_C");
|
|
|
47 |
return l;
|
|
|
48 |
}
|
|
|
49 |
|
132 |
ilm |
50 |
@Override
|
|
|
51 |
public boolean isPrivate() {
|
|
|
52 |
return true;
|
|
|
53 |
}
|
|
|
54 |
|
18 |
ilm |
55 |
/*
|
|
|
56 |
* (non-Javadoc)
|
|
|
57 |
*
|
|
|
58 |
* @see org.openconcerto.devis.SQLElement#getComponent()
|
|
|
59 |
*/
|
|
|
60 |
public SQLComponent createComponent() {
|
|
|
61 |
return new BaseSQLComponent(this) {
|
|
|
62 |
public void addViews() {
|
|
|
63 |
|
|
|
64 |
this.setLayout(new GridBagLayout());
|
|
|
65 |
|
|
|
66 |
GridBagConstraints cPanel = new DefaultGridBagConstraints();
|
|
|
67 |
|
|
|
68 |
// Salaire brut
|
|
|
69 |
JLabel labelBrut = new JLabel(getLabelFor("SAL_BRUT_C"));
|
|
|
70 |
this.add(labelBrut, cPanel);
|
|
|
71 |
JTextField textSalBrut = new JTextField(10);
|
|
|
72 |
cPanel.gridx++;
|
|
|
73 |
this.add(textSalBrut, cPanel);
|
|
|
74 |
|
|
|
75 |
// CSG Cumulé
|
|
|
76 |
cPanel.gridx++;
|
|
|
77 |
JLabel labelCSG = new JLabel(getLabelFor("CSG_C"));
|
|
|
78 |
this.add(labelCSG, cPanel);
|
|
|
79 |
JTextField textCSG = new JTextField(10);
|
|
|
80 |
cPanel.gridx++;
|
|
|
81 |
this.add(textCSG, cPanel);
|
|
|
82 |
|
|
|
83 |
// cotisation salariale
|
|
|
84 |
cPanel.gridx = 0;
|
|
|
85 |
cPanel.gridy++;
|
|
|
86 |
JLabel labelCotSal = new JLabel(getLabelFor("COT_SAL_C"));
|
|
|
87 |
this.add(labelCotSal, cPanel);
|
|
|
88 |
JTextField textCotSal = new JTextField(10);
|
|
|
89 |
cPanel.gridx++;
|
|
|
90 |
this.add(textCotSal, cPanel);
|
|
|
91 |
|
|
|
92 |
// cotisation patronale
|
|
|
93 |
cPanel.gridx++;
|
|
|
94 |
JLabel labelCotPat = new JLabel(getLabelFor("COT_PAT_C"));
|
|
|
95 |
this.add(labelCotPat, cPanel);
|
|
|
96 |
JTextField textCotPat = new JTextField(10);
|
|
|
97 |
cPanel.gridx++;
|
|
|
98 |
this.add(textCotPat, cPanel);
|
|
|
99 |
|
|
|
100 |
// net imposable
|
|
|
101 |
cPanel.gridx = 0;
|
|
|
102 |
cPanel.gridy++;
|
|
|
103 |
JLabel labelNetImp = new JLabel(getLabelFor("NET_IMP_C"));
|
|
|
104 |
this.add(labelNetImp, cPanel);
|
|
|
105 |
JTextField textNetImp = new JTextField(10);
|
|
|
106 |
cPanel.gridx++;
|
|
|
107 |
this.add(textNetImp, cPanel);
|
|
|
108 |
|
|
|
109 |
cPanel.gridx++;
|
|
|
110 |
JLabel labelNetAPayer = new JLabel(getLabelFor("NET_A_PAYER_C"));
|
|
|
111 |
this.add(labelNetAPayer, cPanel);
|
|
|
112 |
JTextField textNetAPayer = new JTextField(10);
|
|
|
113 |
cPanel.gridx++;
|
|
|
114 |
this.add(textNetAPayer, cPanel);
|
|
|
115 |
|
144 |
ilm |
116 |
// heure
|
132 |
ilm |
117 |
cPanel.gridx = 0;
|
|
|
118 |
cPanel.gridy++;
|
142 |
ilm |
119 |
JLabel labelH = new JLabel(getLabelFor("HEURE_TRAV_C"));
|
132 |
ilm |
120 |
this.add(labelH, cPanel);
|
|
|
121 |
JTextField textH = new JTextField(10);
|
|
|
122 |
cPanel.gridx++;
|
|
|
123 |
this.add(textH, cPanel);
|
|
|
124 |
|
144 |
ilm |
125 |
cPanel.gridx++;
|
|
|
126 |
JLabel labelCice = new JLabel(getLabelFor("CICE_C"));
|
|
|
127 |
this.add(labelCice, cPanel);
|
|
|
128 |
JTextField textCice = new JTextField(10);
|
|
|
129 |
cPanel.gridx++;
|
|
|
130 |
this.add(textCice, cPanel);
|
|
|
131 |
|
|
|
132 |
// Allegement
|
|
|
133 |
cPanel.gridx = 0;
|
|
|
134 |
cPanel.gridy++;
|
|
|
135 |
JLabel labelA = new JLabel(getLabelFor("ALLEGEMENT_COTISATION_C"));
|
|
|
136 |
this.add(labelA, cPanel);
|
|
|
137 |
JTextField textA = new JTextField(10);
|
|
|
138 |
cPanel.gridx++;
|
|
|
139 |
this.add(textA, cPanel);
|
|
|
140 |
|
|
|
141 |
cPanel.gridx++;
|
|
|
142 |
JLabel labelAv = new JLabel(getLabelFor("AVANTAGE_NATURE_C"));
|
|
|
143 |
this.add(labelAv, cPanel);
|
|
|
144 |
JTextField textAv = new JTextField(10);
|
|
|
145 |
cPanel.gridx++;
|
|
|
146 |
this.add(textAv, cPanel);
|
|
|
147 |
|
|
|
148 |
this.addSQLObject(textAv, "AVANTAGE_NATURE_C");
|
|
|
149 |
this.addSQLObject(textA, "ALLEGEMENT_COTISATION_C");
|
|
|
150 |
|
18 |
ilm |
151 |
this.addSQLObject(textCSG, "CSG_C");
|
|
|
152 |
this.addSQLObject(textCotPat, "COT_PAT_C");
|
|
|
153 |
this.addSQLObject(textCotSal, "COT_SAL_C");
|
|
|
154 |
this.addSQLObject(textNetAPayer, "NET_A_PAYER_C");
|
|
|
155 |
this.addSQLObject(textNetImp, "NET_IMP_C");
|
142 |
ilm |
156 |
this.addSQLObject(textH, "HEURE_TRAV_C");
|
18 |
ilm |
157 |
this.addSQLObject(textSalBrut, "SAL_BRUT_C");
|
144 |
ilm |
158 |
this.addSQLObject(textCice, "CICE_C");
|
18 |
ilm |
159 |
}
|
|
|
160 |
};
|
|
|
161 |
}
|
57 |
ilm |
162 |
|
|
|
163 |
@Override
|
|
|
164 |
protected String createCode() {
|
156 |
ilm |
165 |
return createCodeOfPackage() + ".total";
|
57 |
ilm |
166 |
}
|
18 |
ilm |
167 |
}
|