OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 57 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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.SQLComponent;
18
import org.openconcerto.sql.element.UISQLComponent;
19
 
20
import java.util.ArrayList;
21
import java.util.List;
22
 
19 ilm 23
import javax.swing.JTextField;
18 ilm 24
 
25
public class FichePayeElementSQLElement extends ComptaSQLConfElement {
26
    public FichePayeElementSQLElement() {
27
        super("FICHE_PAYE_ELEMENT", "un élément de fiche de paye", "éléments de fiche de paye");
28
    }
29
 
30
    public List<String> getListFields() {
31
        final List<String> l = new ArrayList<String>();
32
 
33
        l.add("NOM");
34
        l.add("NB_BASE");
35
        l.add("TAUX_SAL");
36
        l.add("MONTANT_SAL_AJ");
37
        l.add("MONTANT_SAL_DED");
38
        l.add("TAUX_PAT");
39
        l.add("MONTANT_PAT");
40
        return l;
41
    }
42
 
43
    protected List<String> getComboFields() {
44
        final List<String> l = new ArrayList<String>();
45
 
46
        l.add("NOM");
47
        l.add("NB_BASE");
48
        l.add("TAUX_SAL");
49
        l.add("MONTANT_SAL_AJ");
50
        l.add("MONTANT_SAL_DED");
51
        l.add("TAUX_PAT");
52
        l.add("MONTANT_PAT");
53
        return l;
54
    }
55
 
56
    /*
57
     * (non-Javadoc)
58
     *
59
     * @see org.openconcerto.devis.SQLElement#getComponent()
60
     */
61
    public SQLComponent createComponent() {
62
        return new UISQLComponent(this) {
63
            public void addViews() {
64
                this.addRequiredSQLObject(new JTextField(), "NOM", "left");
65
                this.addRequiredSQLObject(new JTextField(), "NB_BASE", "right");
66
 
67
                this.addSQLObject(new JTextField(), "TAUX_SAL", "left");
68
                this.addSQLObject(new JTextField(), "MONTANT_SAL_AJ", "right");
69
                this.addSQLObject(new JTextField(), "MONTANT_SAL_DED", "right");
70
 
71
                this.addSQLObject(new JTextField(), "TAUX_PAT", "left");
72
                this.addSQLObject(new JTextField(), "MONTANT_PAT", "right");
73
 
74
            }
75
        };
76
    }
57 ilm 77
 
78
    @Override
79
    protected String createCode() {
156 ilm 80
        return createCodeOfPackage() + ".payslip.item";
57 ilm 81
    }
18 ilm 82
}