OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 19 Rev 174
Line 11... Line 11...
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.finance.accounting.ui;
14
 package org.openconcerto.erp.core.finance.accounting.ui;
15
 
15
 
-
 
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
-
 
17
import org.openconcerto.erp.core.common.ui.IListFilterDatePanel;
-
 
18
import org.openconcerto.sql.Configuration;
-
 
19
import org.openconcerto.sql.model.SQLRow;
16
import org.openconcerto.sql.model.SQLRowValues;
20
import org.openconcerto.sql.model.SQLRowValues;
17
import org.openconcerto.sql.view.list.ITableModel;
21
import org.openconcerto.sql.view.list.ITableModel;
18
import org.openconcerto.ui.DefaultGridBagConstraints;
22
import org.openconcerto.ui.DefaultGridBagConstraints;
19
import org.openconcerto.utils.GestionDevise;
23
import org.openconcerto.utils.GestionDevise;
20
 
24
 
21
import java.awt.Color;
25
import java.awt.Color;
22
import java.awt.GridBagConstraints;
26
import java.awt.GridBagConstraints;
23
import java.awt.GridBagLayout;
27
import java.awt.GridBagLayout;
24
import java.awt.Insets;
28
import java.awt.Insets;
-
 
29
import java.util.Date;
25
 
30
 
26
import javax.swing.BorderFactory;
31
import javax.swing.BorderFactory;
27
import javax.swing.JLabel;
32
import javax.swing.JLabel;
28
import javax.swing.JPanel;
33
import javax.swing.JPanel;
29
import javax.swing.event.TableModelEvent;
34
import javax.swing.event.TableModelEvent;
Line 52... Line 57...
52
        c.weighty = 1;
57
        c.weighty = 1;
53
        c.gridwidth = 2;
58
        c.gridwidth = 2;
54
        c.fill = GridBagConstraints.BOTH;
59
        c.fill = GridBagConstraints.BOTH;
55
        this.add(this.panelEcritures, c);
60
        this.add(this.panelEcritures, c);
56
 
61
 
-
 
62
        SQLRow rowExercice = Configuration.getInstance().getBase().getTable("EXERCICE_COMMON").getRow(ComptaPropsConfiguration.getInstanceCompta().getRowSociete().getInt("ID_EXERCICE_COMMON"));
-
 
63
 
-
 
64
        final IListFilterDatePanel comp = new IListFilterDatePanel(this.panelEcritures.getListe(), this.panelEcritures.getListe().getSource().getElem().getTable().getField("DATE"),
-
 
65
                IListFilterDatePanel.getDefaultMap());
-
 
66
        comp.setDateDu((Date) rowExercice.getObject("DATE_DEB"));
-
 
67
        c.weightx = 1;
-
 
68
        c.gridy++;
-
 
69
        this.add(comp, c);
-
 
70
 
57
        /* Panel Legende */
71
        /* Panel Legende */
58
        c.gridwidth = 1;
72
        c.gridwidth = 1;
59
        c.gridy = GridBagConstraints.RELATIVE;
73
        c.gridy++;
60
        this.panelLegende = new JPanel();
74
        this.panelLegende = new JPanel();
61
        this.panelLegende.setLayout(new GridBagLayout());
75
        this.panelLegende.setLayout(new GridBagLayout());
62
        this.panelLegende.setBorder(BorderFactory.createTitledBorder("Légende"));
76
        this.panelLegende.setBorder(BorderFactory.createTitledBorder("Légende"));
63
 
77
 
64
        c.insets = new Insets(0, 0, 0, 0);
78
        c.insets = new Insets(0, 0, 0, 0);
65
        JPanel panelValide = new JPanel();
79
        JPanel panelValide = new JPanel();
66
        panelValide.setLayout(new GridBagLayout());
80
        panelValide.setLayout(new GridBagLayout());
67
        panelValide.add(new JLabel("Ecritures validées"));
81
        panelValide.add(new JLabel("Ecritures validées"));
68
        panelValide.setBackground(Color.WHITE);
82
        panelValide.setBackground(Color.WHITE);
69
        // panelValide.setBorder(BorderFactory.createLineBorder(Color.BLACK));
83
        // panelValide.setBorder(BorderFactory.createLineBorder(Color.BLACK));
-
 
84
        c.gridy++;
70
        this.panelLegende.add(panelValide, c);
85
        this.panelLegende.add(panelValide, c);
71
 
86
 
72
        JPanel panelNonValide = new JPanel();
87
        JPanel panelNonValide = new JPanel();
73
        panelNonValide.setLayout(new GridBagLayout());
88
        panelNonValide.setLayout(new GridBagLayout());
74
        panelNonValide.add(new JLabel("Ecritures non validées"));
89
        panelNonValide.add(new JLabel("Ecritures non validées"));
75
        panelNonValide.setBackground(ListEcritureRenderer.getCouleurEcritureNonValide());
90
        panelNonValide.setBackground(ListEcritureRenderer.getCouleurEcritureNonValide());
76
        // panelNonValide.setBorder(BorderFactory.createLineBorder(Color.BLACK));
91
        // panelNonValide.setBorder(BorderFactory.createLineBorder(Color.BLACK));
-
 
92
        c.gridy++;
77
        this.panelLegende.add(panelNonValide, c);
93
        this.panelLegende.add(panelNonValide, c);
78
 
94
 
79
        JPanel panelNonValideToDay = new JPanel();
95
        JPanel panelNonValideToDay = new JPanel();
80
        panelNonValideToDay.setLayout(new GridBagLayout());
96
        panelNonValideToDay.setLayout(new GridBagLayout());
81
        panelNonValideToDay.add(new JLabel("Ecritures non validées du jour"));
97
        panelNonValideToDay.add(new JLabel("Ecritures non validées du jour"));
82
        panelNonValideToDay.setBackground(ListEcritureRenderer.getCouleurEcritureToDay());
98
        panelNonValideToDay.setBackground(ListEcritureRenderer.getCouleurEcritureToDay());
83
        // panelNonValideToDay.setBorder(BorderFactory.createLineBorder(Color.BLACK));
99
        // panelNonValideToDay.setBorder(BorderFactory.createLineBorder(Color.BLACK));
-
 
100
        c.gridy++;
84
        this.panelLegende.add(panelNonValideToDay, c);
101
        this.panelLegende.add(panelNonValideToDay, c);
85
 
102
 
86
        c.gridy = 1;
103
        c.gridy = 2;
87
        c.weightx = 0;
104
        c.weightx = 0;
88
        c.weighty = 0;
105
        c.weighty = 0;
89
        c.insets = new Insets(2, 2, 1, 2);
106
        c.insets = new Insets(2, 2, 1, 2);
90
        this.add(this.panelLegende, c);
107
        this.add(this.panelLegende, c);
91
 
108
 
92
        /* Panel Total */
109
        /* Panel Total */
93
        c.gridx = 0;
110
        c.gridx = 0;
94
        c.gridy = 0;
111
        // c.gridy = 0;
95
        this.panelTotal = new JPanel();
112
        this.panelTotal = new JPanel();
96
        this.panelTotal.setLayout(new GridBagLayout());
113
        this.panelTotal.setLayout(new GridBagLayout());
97
        this.panelTotal.setBorder(BorderFactory.createTitledBorder("Totaux"));
114
        this.panelTotal.setBorder(BorderFactory.createTitledBorder("Totaux"));
98
 
115
 
99
        JLabel labelDebit = new JLabel("Débit");
116
        JLabel labelDebit = new JLabel("Débit");
Line 123... Line 140...
123
        this.panelTotal.add(labelSolde, c);
140
        this.panelTotal.add(labelSolde, c);
124
 
141
 
125
        c.gridx++;
142
        c.gridx++;
126
        this.panelTotal.add(this.montantSolde, c);
143
        this.panelTotal.add(this.montantSolde, c);
127
 
144
 
128
        c.gridy = 1;
145
        c.gridy = 2;
129
        c.gridx = 1;
146
        c.gridx = 1;
130
        c.weightx = 0;
147
        c.weightx = 0;
131
        c.fill = GridBagConstraints.NONE;
148
        c.fill = GridBagConstraints.NONE;
132
        this.add(this.panelTotal, c);
149
        this.add(this.panelTotal, c);
133
 
150