OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 80 | Rev 94 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 80 Rev 83
Line 19... Line 19...
19
import org.openconcerto.erp.core.common.ui.Acompte;
19
import org.openconcerto.erp.core.common.ui.Acompte;
20
import org.openconcerto.erp.core.common.ui.AcompteField;
20
import org.openconcerto.erp.core.common.ui.AcompteField;
21
import org.openconcerto.erp.core.common.ui.AcompteRowItemView;
21
import org.openconcerto.erp.core.common.ui.AcompteRowItemView;
22
import org.openconcerto.erp.core.common.ui.DeviseField;
22
import org.openconcerto.erp.core.common.ui.DeviseField;
23
import org.openconcerto.erp.core.common.ui.TotalPanel;
23
import org.openconcerto.erp.core.common.ui.TotalPanel;
-
 
24
import org.openconcerto.erp.core.common.ui.AbstractVenteArticleItemTable.TypeCalcul;
24
import org.openconcerto.erp.core.sales.invoice.element.SaisieVenteFactureSQLElement;
25
import org.openconcerto.erp.core.sales.invoice.element.SaisieVenteFactureSQLElement;
25
import org.openconcerto.erp.core.sales.invoice.report.VenteFactureXmlSheet;
26
import org.openconcerto.erp.core.sales.invoice.report.VenteFactureXmlSheet;
26
import org.openconcerto.erp.core.sales.invoice.ui.FactureSituationItemTable;
27
import org.openconcerto.erp.core.sales.invoice.ui.FactureSituationItemTable;
27
import org.openconcerto.erp.generationEcritures.GenerationMvtSaisieVenteFacture;
28
import org.openconcerto.erp.generationEcritures.GenerationMvtSaisieVenteFacture;
28
import org.openconcerto.sql.Configuration;
29
import org.openconcerto.sql.Configuration;
29
import org.openconcerto.sql.element.ElementSQLObject;
30
import org.openconcerto.sql.element.ElementSQLObject;
-
 
31
import org.openconcerto.sql.element.GlobalMapper;
30
import org.openconcerto.sql.element.SQLElement;
32
import org.openconcerto.sql.element.SQLElement;
31
import org.openconcerto.sql.model.SQLRow;
33
import org.openconcerto.sql.model.SQLRow;
32
import org.openconcerto.sql.model.SQLRowValues;
34
import org.openconcerto.sql.model.SQLRowValues;
33
import org.openconcerto.sql.model.SQLTable;
35
import org.openconcerto.sql.model.SQLTable;
34
import org.openconcerto.sql.sqlobject.JUniqueTextField;
36
import org.openconcerto.sql.sqlobject.JUniqueTextField;
Line 61... Line 63...
61
 
63
 
62
public class VenteFactureSituationSQLComponent extends TransfertGroupSQLComponent {
64
public class VenteFactureSituationSQLComponent extends TransfertGroupSQLComponent {
63
    public static final String ID = "sales.invoice.partial";
65
    public static final String ID = "sales.invoice.partial";
64
 
66
 
65
    public VenteFactureSituationSQLComponent(SQLElement element) {
67
    public VenteFactureSituationSQLComponent(SQLElement element) {
66
        super(element, new PartialInvoiceEditGroup());
68
        super(element, (Group) GlobalMapper.getInstance().get(ID));
67
    }
69
    }
68
 
70
 
69
    public VenteFactureSituationSQLComponent(SQLElement element, Group p) {
71
    public VenteFactureSituationSQLComponent(SQLElement element, Group p) {
70
        super(element, p);
72
        super(element, p);
71
    }
73
    }
Line 143... Line 145...
143
        acompteField.getDocument().addDocumentListener(new SimpleDocumentListener() {
145
        acompteField.getDocument().addDocumentListener(new SimpleDocumentListener() {
144
 
146
 
145
            @Override
147
            @Override
146
            public void update(DocumentEvent e) {
148
            public void update(DocumentEvent e) {
147
                Acompte a = acompteField.getValue();
149
                Acompte a = acompteField.getValue();
148
                table.calculPourcentage(a);
150
                table.calculPourcentage(a,TypeCalcul.CALCUL_FACTURABLE);
149
            }
151
            }
150
        });
152
        });
151
        final TotalPanel total = ((TotalPanel) getEditor("sales.invoice.partial.total.amount"));
153
        final TotalPanel total = ((TotalPanel) getEditor("sales.invoice.partial.total.amount"));
152
        total.addValueListener(new PropertyChangeListener() {
154
        total.addValueListener(new PropertyChangeListener() {
153
 
155
 
Line 158... Line 160...
158
            }
160
            }
159
        });
161
        });
160
 
162
 
161
    }
163
    }
162
 
164
 
-
 
165
    int countPole = 0;
-
 
166
 
-
 
167
    // @Override
-
 
168
    // public Component addView(MutableRowItemView rowItemView, String fields, Object specObj) {
-
 
169
    //
-
 
170
    // if (fields.contains("ID_POLE_PRODUIT") && countPole == 0) {
-
 
171
    // countPole++;
-
 
172
    // return null;
-
 
173
    // } else {
-
 
174
    // return super.addView(rowItemView, fields, specObj);
-
 
175
    // }
-
 
176
    // }
-
 
177
 
163
    @Override
178
    @Override
164
    public JComponent getLabel(String id) {
179
    public JComponent getLabel(String id) {
165
        if (id.equals("sales.invoice.partial.amount")) {
180
        if (id.equals("sales.invoice.partial.amount")) {
166
            final JLabel jLabel = new JLabel("Montant à facturer");
181
            final JLabel jLabel = new JLabel("Montant à facturer");
167
            jLabel.setHorizontalAlignment(SwingConstants.RIGHT);
182
            jLabel.setHorizontalAlignment(SwingConstants.RIGHT);