OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 156 Rev 177
Line 25... Line 25...
25
import org.openconcerto.sql.model.SQLRowValues;
25
import org.openconcerto.sql.model.SQLRowValues;
26
import org.openconcerto.sql.sqlobject.ElementComboBox;
26
import org.openconcerto.sql.sqlobject.ElementComboBox;
27
import org.openconcerto.sql.sqlobject.SQLRequestComboBox;
27
import org.openconcerto.sql.sqlobject.SQLRequestComboBox;
28
import org.openconcerto.ui.DefaultGridBagConstraints;
28
import org.openconcerto.ui.DefaultGridBagConstraints;
29
import org.openconcerto.utils.ListMap;
29
import org.openconcerto.utils.ListMap;
-
 
30
import org.openconcerto.utils.NoneSelectedButtonGroup;
30
 
31
 
31
import java.awt.GridBagConstraints;
32
import java.awt.GridBagConstraints;
32
import java.awt.GridBagLayout;
33
import java.awt.GridBagLayout;
33
import java.awt.Insets;
34
import java.awt.Insets;
34
import java.awt.event.MouseAdapter;
35
import java.awt.event.MouseAdapter;
Line 67... Line 68...
67
        l.add("TAUX");
68
        l.add("TAUX");
68
        l.add("MONTANT");
69
        l.add("MONTANT");
69
        l.add("COTISABLE");
70
        l.add("COTISABLE");
70
        l.add("PART_CP");
71
        l.add("PART_CP");
71
        l.add("TAXABLE_CM");
72
        l.add("TAXABLE_CM");
72
 
-
 
-
 
73
        l.add("CSG_NORMAL");
-
 
74
        l.add("CSG_REDUIT");
73
        return l;
75
        return l;
74
    }
76
    }
75
 
77
 
76
    protected List<String> getComboFields() {
78
    protected List<String> getComboFields() {
77
        final List<String> l = new ArrayList<String>();
79
        final List<String> l = new ArrayList<String>();
Line 337... Line 339...
337
                c.fill = GridBagConstraints.HORIZONTAL;
339
                c.fill = GridBagConstraints.HORIZONTAL;
338
                cPanel.gridwidth = GridBagConstraints.REMAINDER;
340
                cPanel.gridwidth = GridBagConstraints.REMAINDER;
339
                JCheckBox checkCP = new JCheckBox(getLabelFor("PART_CP"));
341
                JCheckBox checkCP = new JCheckBox(getLabelFor("PART_CP"));
340
                panelProp.add(checkCP, cPanel);
342
                panelProp.add(checkCP, cPanel);
341
 
343
 
-
 
344
                // CSG Normal
-
 
345
                cPanel.gridx = 1;
-
 
346
                cPanel.weightx = 1;
-
 
347
                cPanel.gridy++;
-
 
348
                c.fill = GridBagConstraints.HORIZONTAL;
-
 
349
                cPanel.gridwidth = GridBagConstraints.REMAINDER;
-
 
350
                JCheckBox checkCSGN = new JCheckBox(getLabelFor("CSG_NORMAL"));
-
 
351
                panelProp.add(checkCSGN, cPanel);
-
 
352
 
-
 
353
                // CSG Réduite
-
 
354
                cPanel.gridx = 1;
-
 
355
                cPanel.weightx = 1;
-
 
356
                cPanel.gridy++;
-
 
357
                c.fill = GridBagConstraints.HORIZONTAL;
-
 
358
                cPanel.gridwidth = GridBagConstraints.REMAINDER;
-
 
359
                JCheckBox checkCSGR = new JCheckBox(getLabelFor("CSG_REDUIT"));
-
 
360
                panelProp.add(checkCSGR, cPanel);
-
 
361
 
-
 
362
                NoneSelectedButtonGroup groupCSG = new NoneSelectedButtonGroup();
-
 
363
                groupCSG.add(checkCSGN);
-
 
364
                groupCSG.add(checkCSGR);
-
 
365
 
342
                // Type
366
                // Type
343
                JLabel labelSelCodeRubrique = new JLabel("Code DSN (S21.G00.51.011)");
367
                JLabel labelSelCodeRubrique = new JLabel("Code DSN (S21.G00.51.011)");
344
                labelSelCodeRubrique.setHorizontalAlignment(SwingConstants.RIGHT);
368
                labelSelCodeRubrique.setHorizontalAlignment(SwingConstants.RIGHT);
345
                cPanel.gridy++;
369
                cPanel.gridy++;
346
                cPanel.gridx = 1;
370
                cPanel.gridx = 1;
Line 375... Line 399...
375
                this.addRequiredSQLObject(comboSelTypeImpression, "ID_IMPRESSION_RUBRIQUE");
399
                this.addRequiredSQLObject(comboSelTypeImpression, "ID_IMPRESSION_RUBRIQUE");
376
                this.addSQLObject(checkBrut, "PART_BRUT");
400
                this.addSQLObject(checkBrut, "PART_BRUT");
377
                this.addSQLObject(checkCotis, "COTISABLE");
401
                this.addSQLObject(checkCotis, "COTISABLE");
378
                this.addSQLObject(checkCP, "PART_CP");
402
                this.addSQLObject(checkCP, "PART_CP");
379
                this.addSQLObject(checkImpo, "TAXABLE_CM");
403
                this.addSQLObject(checkImpo, "TAXABLE_CM");
-
 
404
                this.addSQLObject(checkCSGN, "CSG_NORMAL");
-
 
405
                this.addSQLObject(checkCSGR, "CSG_REDUIT");
380
 
406
 
381
                selSalarie.addValueListener(new PropertyChangeListener() {
407
                selSalarie.addValueListener(new PropertyChangeListener() {
382
 
408
 
383
                    public void propertyChange(PropertyChangeEvent evt) {
409
                    public void propertyChange(PropertyChangeEvent evt) {
384
                        formuleBase.setSalarieID(selSalarie.getSelectedId());
410
                        formuleBase.setSalarieID(selSalarie.getSelectedId());
Line 392... Line 418...
392
            protected SQLRowValues createDefaults() {
418
            protected SQLRowValues createDefaults() {
393
                SQLRowValues rowVals = new SQLRowValues(getTable());
419
                SQLRowValues rowVals = new SQLRowValues(getTable());
394
                rowVals.put("TAXABLE_CM", Boolean.TRUE);
420
                rowVals.put("TAXABLE_CM", Boolean.TRUE);
395
                rowVals.put("COTISABLE", Boolean.TRUE);
421
                rowVals.put("COTISABLE", Boolean.TRUE);
396
                rowVals.put("PART_BRUT", Boolean.TRUE);
422
                rowVals.put("PART_BRUT", Boolean.TRUE);
397
 
-
 
-
 
423
                rowVals.put("CSG_NORMAL", Boolean.TRUE);
398
                return rowVals;
424
                return rowVals;
399
            }
425
            }
400
        };
426
        };
401
    }
427
    }
402
 
428