OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 80 | Rev 132 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
80 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.supplychain.order.element;
15
 
16
import java.util.ArrayList;
17
import java.util.HashSet;
18
import java.util.List;
19
import java.util.Set;
20
 
94 ilm 21
import org.openconcerto.erp.core.common.element.ComptaSQLConfElement;
22
import org.openconcerto.erp.core.supplychain.order.component.FactureFournisseurSQLComponent;
23
import org.openconcerto.erp.generationDoc.gestcomm.FactureFournisseurXmlSheet;
24
import org.openconcerto.erp.model.MouseSheetXmlListeListener;
25
import org.openconcerto.sql.element.SQLComponent;
26
 
80 ilm 27
public class FactureFournisseurSQLElement extends ComptaSQLConfElement {
28
 
29
    public FactureFournisseurSQLElement() {
30
        super("FACTURE_FOURNISSEUR", "une facture fournisseur", "factures fournisseur");
94 ilm 31
        MouseSheetXmlListeListener mouseSheetXmlListeListener = new MouseSheetXmlListeListener(FactureFournisseurXmlSheet.class);
32
        mouseSheetXmlListeListener.setGenerateHeader(true);
33
        mouseSheetXmlListeListener.setShowHeader(true);
34
        getRowActions().addAll(mouseSheetXmlListeListener.getRowActions());
80 ilm 35
    }
36
 
37
    protected List<String> getListFields() {
38
        final List<String> l = new ArrayList<String>();
39
        l.add("NUMERO");
40
        l.add("NOM");
41
        l.add("DATE");
42
        l.add("ID_FOURNISSEUR");
43
        l.add("T_HT");
44
        l.add("T_TTC");
45
        l.add("INFOS");
46
        return l;
47
    }
48
 
49
    protected List<String> getComboFields() {
50
        final List<String> l = new ArrayList<String>();
51
        l.add("NUMERO");
52
        l.add("NOM");
53
        l.add("DATE");
54
        return l;
55
    }
56
 
57
    @Override
58
    protected Set<String> getChildren() {
59
        Set<String> set = new HashSet<String>();
60
        set.add("FACTURE_FOURNISSEUR_ELEMENT");
61
        return set;
62
    }
63
 
64
    protected List<String> getPrivateFields() {
65
        final List<String> l = new ArrayList<String>();
66
        l.addAll(super.getPrivateFields());
67
        l.add("ID_MODE_REGLEMENT");
68
        return l;
69
    }
70
 
71
    /*
72
     * (non-Javadoc)
73
     *
74
     * @see org.openconcerto.devis.SQLElement#getComponent()
75
     */
76
    public SQLComponent createComponent() {
77
        return new FactureFournisseurSQLComponent();
78
    }
79
 
80
    @Override
81
    protected String createCode() {
82
        return createCodeFromPackage() + ".invoice.purchase";
83
    }
84
}