OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 57 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57 Rev 156
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
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
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
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.
9
 * language governing permissions and limitations under the License.
10
 * 
10
 * 
11
 * When distributing the software, include this License Header Notice in each file.
11
 * When distributing the software, include this License Header Notice in each file.
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.core.common.element.ComptaSQLConfElement;
16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
17
import org.openconcerto.sql.element.SQLComponent;
17
import org.openconcerto.sql.element.SQLComponent;
18
import org.openconcerto.sql.element.UISQLComponent;
18
import org.openconcerto.sql.element.UISQLComponent;
19
 
19
 
20
import java.util.ArrayList;
20
import java.util.ArrayList;
21
import java.util.List;
21
import java.util.List;
22
 
22
 
23
import javax.swing.JTextField;
23
import javax.swing.JTextField;
24
 
24
 
25
public class FichePayeElementSQLElement extends ComptaSQLConfElement {
25
public class FichePayeElementSQLElement extends ComptaSQLConfElement {
26
    public FichePayeElementSQLElement() {
26
    public FichePayeElementSQLElement() {
27
        super("FICHE_PAYE_ELEMENT", "un élément de fiche de paye", "éléments de fiche de paye");
27
        super("FICHE_PAYE_ELEMENT", "un élément de fiche de paye", "éléments de fiche de paye");
28
    }
28
    }
29
 
29
 
30
    public List<String> getListFields() {
30
    public List<String> getListFields() {
31
        final List<String> l = new ArrayList<String>();
31
        final List<String> l = new ArrayList<String>();
32
 
32
 
33
        l.add("NOM");
33
        l.add("NOM");
34
        l.add("NB_BASE");
34
        l.add("NB_BASE");
35
        l.add("TAUX_SAL");
35
        l.add("TAUX_SAL");
36
        l.add("MONTANT_SAL_AJ");
36
        l.add("MONTANT_SAL_AJ");
37
        l.add("MONTANT_SAL_DED");
37
        l.add("MONTANT_SAL_DED");
38
        l.add("TAUX_PAT");
38
        l.add("TAUX_PAT");
39
        l.add("MONTANT_PAT");
39
        l.add("MONTANT_PAT");
40
        return l;
40
        return l;
41
    }
41
    }
42
 
42
 
43
    protected List<String> getComboFields() {
43
    protected List<String> getComboFields() {
44
        final List<String> l = new ArrayList<String>();
44
        final List<String> l = new ArrayList<String>();
45
 
45
 
46
        l.add("NOM");
46
        l.add("NOM");
47
        l.add("NB_BASE");
47
        l.add("NB_BASE");
48
        l.add("TAUX_SAL");
48
        l.add("TAUX_SAL");
49
        l.add("MONTANT_SAL_AJ");
49
        l.add("MONTANT_SAL_AJ");
50
        l.add("MONTANT_SAL_DED");
50
        l.add("MONTANT_SAL_DED");
51
        l.add("TAUX_PAT");
51
        l.add("TAUX_PAT");
52
        l.add("MONTANT_PAT");
52
        l.add("MONTANT_PAT");
53
        return l;
53
        return l;
54
    }
54
    }
55
 
55
 
56
    /*
56
    /*
57
     * (non-Javadoc)
57
     * (non-Javadoc)
58
     * 
58
     * 
59
     * @see org.openconcerto.devis.SQLElement#getComponent()
59
     * @see org.openconcerto.devis.SQLElement#getComponent()
60
     */
60
     */
61
    public SQLComponent createComponent() {
61
    public SQLComponent createComponent() {
62
        return new UISQLComponent(this) {
62
        return new UISQLComponent(this) {
63
            public void addViews() {
63
            public void addViews() {
64
                this.addRequiredSQLObject(new JTextField(), "NOM", "left");
64
                this.addRequiredSQLObject(new JTextField(), "NOM", "left");
65
                this.addRequiredSQLObject(new JTextField(), "NB_BASE", "right");
65
                this.addRequiredSQLObject(new JTextField(), "NB_BASE", "right");
66
 
66
 
67
                this.addSQLObject(new JTextField(), "TAUX_SAL", "left");
67
                this.addSQLObject(new JTextField(), "TAUX_SAL", "left");
68
                this.addSQLObject(new JTextField(), "MONTANT_SAL_AJ", "right");
68
                this.addSQLObject(new JTextField(), "MONTANT_SAL_AJ", "right");
69
                this.addSQLObject(new JTextField(), "MONTANT_SAL_DED", "right");
69
                this.addSQLObject(new JTextField(), "MONTANT_SAL_DED", "right");
70
 
70
 
71
                this.addSQLObject(new JTextField(), "TAUX_PAT", "left");
71
                this.addSQLObject(new JTextField(), "TAUX_PAT", "left");
72
                this.addSQLObject(new JTextField(), "MONTANT_PAT", "right");
72
                this.addSQLObject(new JTextField(), "MONTANT_PAT", "right");
73
 
73
 
74
            }
74
            }
75
        };
75
        };
76
    }
76
    }
77
 
77
 
78
    @Override
78
    @Override
79
    protected String createCode() {
79
    protected String createCode() {
80
        return createCodeFromPackage() + ".payslip.item";
80
        return createCodeOfPackage() + ".payslip.item";
81
    }
81
    }
82
}
82
}