OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 132 | Rev 151 | 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;
142 ilm 26
import org.openconcerto.utils.ListMap;
94 ilm 27
 
80 ilm 28
public class FactureFournisseurSQLElement extends ComptaSQLConfElement {
29
 
30
    public FactureFournisseurSQLElement() {
31
        super("FACTURE_FOURNISSEUR", "une facture fournisseur", "factures fournisseur");
94 ilm 32
        MouseSheetXmlListeListener mouseSheetXmlListeListener = new MouseSheetXmlListeListener(FactureFournisseurXmlSheet.class);
33
        mouseSheetXmlListeListener.setGenerateHeader(true);
34
        mouseSheetXmlListeListener.setShowHeader(true);
35
        getRowActions().addAll(mouseSheetXmlListeListener.getRowActions());
80 ilm 36
    }
37
 
38
    protected List<String> getListFields() {
39
        final List<String> l = new ArrayList<String>();
40
        l.add("NUMERO");
41
        l.add("NOM");
42
        l.add("DATE");
43
        l.add("ID_FOURNISSEUR");
44
        l.add("T_HT");
45
        l.add("T_TTC");
46
        l.add("INFOS");
47
        return l;
48
    }
49
 
142 ilm 50
    @Override
51
    public ListMap<String, String> getShowAs() {
52
        ListMap<String, String> map = new ListMap<String, String>();
53
        map.putCollection(null, "NUMERO", "DATE");
54
        return map;
55
    }
56
 
80 ilm 57
    protected List<String> getComboFields() {
58
        final List<String> l = new ArrayList<String>();
59
        l.add("NUMERO");
60
        l.add("NOM");
61
        l.add("DATE");
62
        return l;
63
    }
64
 
65
    /*
66
     * (non-Javadoc)
67
     *
68
     * @see org.openconcerto.devis.SQLElement#getComponent()
69
     */
70
    public SQLComponent createComponent() {
71
        return new FactureFournisseurSQLComponent();
72
    }
73
 
74
    @Override
75
    protected String createCode() {
76
        return createCodeFromPackage() + ".invoice.purchase";
77
    }
78
}