OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 73 | Rev 93 | Go to most recent revision | 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.finance.payment.element;
15
 
16
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
17
import org.openconcerto.erp.core.common.ui.DeviseField;
18
import org.openconcerto.erp.core.finance.accounting.element.MouvementSQLElement;
80 ilm 19
import org.openconcerto.erp.core.finance.payment.ui.RegleMontantTable;
18 ilm 20
import org.openconcerto.erp.generationEcritures.GenerationReglementAchat;
21
import org.openconcerto.erp.preferences.ModeReglementDefautPrefPanel;
22
import org.openconcerto.sql.Configuration;
23
import org.openconcerto.sql.element.BaseSQLComponent;
24
import org.openconcerto.sql.element.ElementSQLObject;
25
import org.openconcerto.sql.element.SQLComponent;
26
import org.openconcerto.sql.element.SQLElement;
80 ilm 27
import org.openconcerto.sql.model.SQLInjector;
18 ilm 28
import org.openconcerto.sql.model.SQLRow;
29
import org.openconcerto.sql.model.SQLRowAccessor;
30
import org.openconcerto.sql.model.SQLRowValues;
31
import org.openconcerto.sql.model.SQLTable;
32
import org.openconcerto.sql.sqlobject.ElementComboBox;
80 ilm 33
import org.openconcerto.sql.view.list.RowValuesTableModel;
18 ilm 34
import org.openconcerto.ui.DefaultGridBagConstraints;
35
import org.openconcerto.ui.JDate;
36
import org.openconcerto.ui.TitledSeparator;
37
import org.openconcerto.ui.warning.JLabelWarning;
73 ilm 38
import org.openconcerto.utils.ExceptionHandler;
18 ilm 39
import org.openconcerto.utils.GestionDevise;
80 ilm 40
import org.openconcerto.utils.text.SimpleDocumentListener;
18 ilm 41
 
42
import java.awt.GridBagConstraints;
43
import java.awt.GridBagLayout;
44
import java.awt.Insets;
45
import java.sql.SQLException;
46
import java.util.ArrayList;
80 ilm 47
import java.util.Calendar;
48
import java.util.Collections;
49
import java.util.Comparator;
18 ilm 50
import java.util.List;
51
 
52
import javax.swing.JLabel;
53
import javax.swing.SwingConstants;
54
import javax.swing.event.DocumentEvent;
80 ilm 55
import javax.swing.event.TableModelEvent;
56
import javax.swing.event.TableModelListener;
18 ilm 57
 
58
public class ReglerMontantSQLElement extends ComptaSQLConfElement {
59
 
60
    public ReglerMontantSQLElement() {
61
        super("REGLER_MONTANT", "un règlement à un fournisseur", "règlements aux fournisseurs");
62
    }
63
 
64
    protected List<String> getListFields() {
65
        final List<String> l = new ArrayList<String>();
66
        l.add("DATE");
67
        l.add("ID_ECHEANCE_FOURNISSEUR");
68
        l.add("ID_MODE_REGLEMENT");
69
        l.add("MONTANT");
70
        return l;
71
    }
72
 
73
    protected List<String> getComboFields() {
74
        final List<String> l = new ArrayList<String>();
75
        l.add("DATE");
76
        l.add("MONTANT");
77
        return l;
78
    }
79
 
80
    protected List<String> getPrivateFields() {
81
        final List<String> l = new ArrayList<String>();
82
        l.add("ID_MODE_REGLEMENT");
83
        return l;
84
    }
85
 
86
    /*
87
     * (non-Javadoc)
88
     *
89
     * @see org.openconcerto.devis.SQLElement#getComponent()
90
     */
91
    public SQLComponent createComponent() {
92
 
80 ilm 93
        return new ReglerMontantSQLComponent(this);
18 ilm 94
    };
57 ilm 95
 
96
    @Override
97
    protected String createCode() {
98
        return createCodeFromPackage() + ".regulation";
99
    }
18 ilm 100
}