Line 12... |
Line 12... |
12 |
*/
|
12 |
*/
|
13 |
|
13 |
|
14 |
package org.openconcerto.erp.core.humanresources.payroll.element;
|
14 |
package org.openconcerto.erp.core.humanresources.payroll.element;
|
15 |
|
15 |
|
16 |
import org.openconcerto.erp.config.DsnBrutCode;
|
16 |
import org.openconcerto.erp.config.DsnBrutCode;
|
- |
|
17 |
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
|
17 |
import org.openconcerto.erp.core.common.ui.SQLJavaEditor;
|
18 |
import org.openconcerto.erp.core.common.ui.SQLJavaEditor;
|
18 |
import org.openconcerto.erp.core.humanresources.payroll.component.FormuleTreeNode;
|
19 |
import org.openconcerto.erp.core.humanresources.payroll.component.FormuleTreeNode;
|
19 |
import org.openconcerto.erp.core.humanresources.payroll.component.RubriqueSQLComponent;
|
20 |
import org.openconcerto.erp.core.humanresources.payroll.component.RubriqueSQLComponent;
|
20 |
import org.openconcerto.erp.core.humanresources.payroll.component.VariableTree;
|
21 |
import org.openconcerto.erp.core.humanresources.payroll.component.VariableTree;
|
21 |
import org.openconcerto.sql.element.ConfSQLElement;
|
- |
|
22 |
import org.openconcerto.sql.element.ElementSQLObject;
|
22 |
import org.openconcerto.sql.element.ElementSQLObject;
|
23 |
import org.openconcerto.sql.element.SQLComponent;
|
23 |
import org.openconcerto.sql.element.SQLComponent;
|
24 |
import org.openconcerto.sql.element.SQLElement;
|
24 |
import org.openconcerto.sql.element.SQLElement;
|
- |
|
25 |
import org.openconcerto.sql.model.DBRoot;
|
25 |
import org.openconcerto.sql.model.Where;
|
26 |
import org.openconcerto.sql.model.Where;
|
26 |
import org.openconcerto.sql.request.ComboSQLRequest;
|
27 |
import org.openconcerto.sql.request.ComboSQLRequest;
|
27 |
import org.openconcerto.sql.sqlobject.ElementComboBox;
|
28 |
import org.openconcerto.sql.sqlobject.ElementComboBox;
|
- |
|
29 |
import org.openconcerto.sql.sqlobject.SQLRequestComboBox;
|
28 |
import org.openconcerto.ui.DefaultGridBagConstraints;
|
30 |
import org.openconcerto.ui.DefaultGridBagConstraints;
|
29 |
import org.openconcerto.ui.TitledSeparator;
|
31 |
import org.openconcerto.ui.TitledSeparator;
|
30 |
import org.openconcerto.utils.ListMap;
|
32 |
import org.openconcerto.utils.ListMap;
|
31 |
|
33 |
|
32 |
import java.awt.GridBagConstraints;
|
34 |
import java.awt.GridBagConstraints;
|
Line 54... |
Line 56... |
54 |
import javax.swing.SwingConstants;
|
56 |
import javax.swing.SwingConstants;
|
55 |
import javax.swing.tree.TreePath;
|
57 |
import javax.swing.tree.TreePath;
|
56 |
|
58 |
|
57 |
// TODO FRAIS NATURE
|
59 |
// TODO FRAIS NATURE
|
58 |
// FIXME rubrique.code must have a java var syntax
|
60 |
// FIXME rubrique.code must have a java var syntax
|
59 |
public class RubriqueNetSQLElement extends ConfSQLElement {
|
61 |
public class RubriqueNetSQLElement extends ComptaSQLConfElement {
|
60 |
|
62 |
|
61 |
public RubriqueNetSQLElement() {
|
63 |
public RubriqueNetSQLElement(final DBRoot root) {
|
62 |
super("RUBRIQUE_NET", "une rubrique de net", "rubriques de net");
|
64 |
super(root.getTable("RUBRIQUE_NET"), "une rubrique de net", "rubriques de net");
|
63 |
}
|
65 |
}
|
64 |
|
66 |
|
65 |
protected List<String> getListFields() {
|
67 |
protected List<String> getListFields() {
|
66 |
final List<String> l = new ArrayList<String>();
|
68 |
final List<String> l = new ArrayList<String>();
|
67 |
l.add("CODE");
|
69 |
l.add("CODE");
|
Line 280... |
Line 282... |
280 |
cPanel.weightx = 0;
|
282 |
cPanel.weightx = 0;
|
281 |
cPanel.anchor = GridBagConstraints.WEST;
|
283 |
cPanel.anchor = GridBagConstraints.WEST;
|
282 |
panelProp.add(labelSelTypeRubrique, cPanel);
|
284 |
panelProp.add(labelSelTypeRubrique, cPanel);
|
283 |
cPanel.anchor = GridBagConstraints.NORTHWEST;
|
285 |
cPanel.anchor = GridBagConstraints.NORTHWEST;
|
284 |
|
286 |
|
285 |
ElementComboBox comboSelType = new ElementComboBox(true, 20);
|
287 |
SQLRequestComboBox comboSelType = new SQLRequestComboBox(true, 20);
|
286 |
|
288 |
|
287 |
cPanel.gridx++;
|
289 |
cPanel.gridx++;
|
288 |
panelProp.add(comboSelType, cPanel);
|
290 |
panelProp.add(comboSelType, cPanel);
|
289 |
|
291 |
|
290 |
// Impression
|
292 |
// Impression
|
Line 293... |
Line 295... |
293 |
cPanel.gridx++;
|
295 |
cPanel.gridx++;
|
294 |
cPanel.anchor = GridBagConstraints.WEST;
|
296 |
cPanel.anchor = GridBagConstraints.WEST;
|
295 |
panelProp.add(labelSelTypeRubriqueImpression, cPanel);
|
297 |
panelProp.add(labelSelTypeRubriqueImpression, cPanel);
|
296 |
cPanel.anchor = GridBagConstraints.NORTHWEST;
|
298 |
cPanel.anchor = GridBagConstraints.NORTHWEST;
|
297 |
|
299 |
|
298 |
ElementComboBox comboSelTypeImpression = new ElementComboBox(true, 20);
|
300 |
SQLRequestComboBox comboSelTypeImpression = new SQLRequestComboBox(true, 20);
|
299 |
cPanel.gridx++;
|
301 |
cPanel.gridx++;
|
300 |
c.fill = GridBagConstraints.NONE;
|
302 |
c.fill = GridBagConstraints.NONE;
|
301 |
c.weightx = 0;
|
303 |
c.weightx = 0;
|
302 |
panelProp.add(comboSelTypeImpression, cPanel);
|
304 |
panelProp.add(comboSelTypeImpression, cPanel);
|
303 |
|
305 |
|
Line 447... |
Line 449... |
447 |
this.addSQLObject(checkFraisPers, "FRAIS_PERS");
|
449 |
this.addSQLObject(checkFraisPers, "FRAIS_PERS");
|
448 |
this.addSQLObject(checkImpo, "IMPOSABLE");
|
450 |
this.addSQLObject(checkImpo, "IMPOSABLE");
|
449 |
this.addRequiredSQLObject(comboSelTypeImpression, "ID_IMPRESSION_RUBRIQUE");
|
451 |
this.addRequiredSQLObject(comboSelTypeImpression, "ID_IMPRESSION_RUBRIQUE");
|
450 |
this.addRequiredSQLObject(comboSelType, "ID_TYPE_RUBRIQUE_NET");
|
452 |
this.addRequiredSQLObject(comboSelType, "ID_TYPE_RUBRIQUE_NET");
|
451 |
|
453 |
|
452 |
comboSelType.setButtonsVisible(false);
|
- |
|
453 |
comboSelTypeImpression.setButtonsVisible(false);
|
- |
|
454 |
|
- |
|
455 |
selSalarie.addValueListener(new PropertyChangeListener() {
|
454 |
selSalarie.addValueListener(new PropertyChangeListener() {
|
456 |
public void propertyChange(PropertyChangeEvent evt) {
|
455 |
public void propertyChange(PropertyChangeEvent evt) {
|
457 |
// TODO Auto-generated method stub
|
456 |
// TODO Auto-generated method stub
|
458 |
formuleBase.setSalarieID(selSalarie.getSelectedId());
|
457 |
formuleBase.setSalarieID(selSalarie.getSelectedId());
|
459 |
formuleTaux.setSalarieID(selSalarie.getSelectedId());
|
458 |
formuleTaux.setSalarieID(selSalarie.getSelectedId());
|