OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 156
Line 39... Line 39...
39
 
39
 
40
        for (org.openconcerto.sql.model.SQLField sqlField : this.getTable().getContentFields()) {
40
        for (org.openconcerto.sql.model.SQLField sqlField : this.getTable().getContentFields()) {
41
 
41
 
42
            String field = sqlField.getName();
42
            String field = sqlField.getName();
43
            if (!field.equalsIgnoreCase("ID_USER_COMMON_CREATE") && !field.equalsIgnoreCase("ID_USER_COMMON_MODIFY") && !field.equalsIgnoreCase("MODIFICATION_DATE")
43
            if (!field.equalsIgnoreCase("ID_USER_COMMON_CREATE") && !field.equalsIgnoreCase("ID_USER_COMMON_MODIFY") && !field.equalsIgnoreCase("MODIFICATION_DATE")
44
                    && !field.equalsIgnoreCase("CREATION_DATE") && !field.endsWith("_DEFAULT_VAL")) {
44
                    && !field.equalsIgnoreCase("CREATION_DATE") && !field.endsWith("_DEFAULT_VAL") && !field.endsWith("_CUMUL_VAL")) {
45
                l.add(field);
45
                l.add(field);
46
            }
46
            }
47
        }
47
        }
48
        Collections.sort(l);
48
        Collections.sort(l);
49
        return l;
49
        return l;
Line 74... Line 74...
74
                GridBagConstraints c = new DefaultGridBagConstraints();
74
                GridBagConstraints c = new DefaultGridBagConstraints();
75
                c.gridx = GridBagConstraints.RELATIVE;
75
                c.gridx = GridBagConstraints.RELATIVE;
76
                this.add(new JLabel("Nom de la variable"), c);
76
                this.add(new JLabel("Nom de la variable"), c);
77
                this.add(new JLabel("Valeur période courante"), c);
77
                this.add(new JLabel("Valeur période courante"), c);
78
                this.add(new JLabel("Valeur d'initialisation par défaut(prochain bulletin)"), c);
78
                this.add(new JLabel("Valeur d'initialisation par défaut(prochain bulletin)"), c);
-
 
79
                this.add(new JLabel("Cumuls"), c);
79
 
80
 
80
                final List<String> listFields = getListFields();
81
                final List<String> listFields = getListFields();
81
 
82
 
82
                for (String fieldName : listFields) {
83
                for (String fieldName : listFields) {
83
 
84
 
Line 90... Line 91...
90
                        final JTextField textFieldValDef = new JTextField(15);
91
                        final JTextField textFieldValDef = new JTextField(15);
91
                        this.add(textFieldValDef, c);
92
                        this.add(textFieldValDef, c);
92
                        this.addView(textFieldValDef, fieldName + "_DEFAULT_VAL");
93
                        this.addView(textFieldValDef, fieldName + "_DEFAULT_VAL");
93
 
94
 
94
                    }
95
                    }
-
 
96
                    if (getTable().contains(fieldName + "_CUMUL_VAL")) {
-
 
97
                        final JTextField textFieldValDef = new JTextField(15);
-
 
98
                        this.add(textFieldValDef, c);
-
 
99
                        this.addView(textFieldValDef, fieldName + "_CUMUL_VAL");
-
 
100
 
-
 
101
                    }
95
 
102
 
96
                    // if (pos % 2 == 0) {
103
                    // if (pos % 2 == 0) {
97
                    // this.addSQLObject(new JTextField(15), i, "left");
104
                    // this.addSQLObject(new JTextField(15), i, "left");
98
                    // } else {
105
                    // } else {
99
                    // this.addSQLObject(new JTextField(15), i, "right");
106
                    // this.addSQLObject(new JTextField(15), i, "right");
Line 104... Line 111...
104
        };
111
        };
105
    }
112
    }
106
 
113
 
107
    @Override
114
    @Override
108
    protected String createCode() {
115
    protected String createCode() {
109
        return createCodeFromPackage() + ".employe.variable";
116
        return createCodeOfPackage() + ".employe.variable";
110
    }
117
    }
111
}
118
}