OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 94 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 149
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
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
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
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.
9
 * language governing permissions and limitations under the License.
10
 * 
10
 * 
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.preferences;
14
 package org.openconcerto.erp.preferences;
15
 
15
 
16
import java.util.HashMap;
16
import java.util.HashMap;
17
import java.util.Map;
17
import java.util.Map;
18
 
18
 
-
 
19
import org.openconcerto.erp.core.customerrelationship.customer.report.FicheClientXmlSheet;
19
import org.openconcerto.erp.core.sales.invoice.report.VenteFactureXmlSheet;
20
import org.openconcerto.erp.core.sales.invoice.report.VenteFactureXmlSheet;
20
import org.openconcerto.erp.core.sales.order.report.CommandeClientXmlSheet;
21
import org.openconcerto.erp.core.sales.order.report.CommandeClientXmlSheet;
21
import org.openconcerto.erp.core.sales.quote.report.DevisXmlSheet;
22
import org.openconcerto.erp.core.sales.quote.report.DevisXmlSheet;
22
import org.openconcerto.erp.core.sales.shipment.report.BonLivraisonXmlSheet;
23
import org.openconcerto.erp.core.sales.shipment.report.BonLivraisonXmlSheet;
23
import org.openconcerto.erp.generationDoc.gestcomm.AvoirClientXmlSheet;
24
import org.openconcerto.erp.generationDoc.gestcomm.AvoirClientXmlSheet;
24
import org.openconcerto.erp.generationDoc.gestcomm.AvoirFournisseurXmlSheet;
25
import org.openconcerto.erp.generationDoc.gestcomm.AvoirFournisseurXmlSheet;
25
import org.openconcerto.erp.generationDoc.gestcomm.BonReceptionXmlSheet;
26
import org.openconcerto.erp.generationDoc.gestcomm.BonReceptionXmlSheet;
26
import org.openconcerto.erp.generationDoc.gestcomm.CommandeXmlSheet;
27
import org.openconcerto.erp.generationDoc.gestcomm.CommandeXmlSheet;
27
import org.openconcerto.erp.generationDoc.gestcomm.CourrierClientSheet;
28
import org.openconcerto.erp.generationDoc.gestcomm.CourrierClientSheet;
-
 
29
import org.openconcerto.erp.generationDoc.gestcomm.FicheArticleXmlSheet;
28
import org.openconcerto.erp.generationDoc.gestcomm.RelanceSheet;
30
import org.openconcerto.erp.generationDoc.gestcomm.RelanceSheet;
29
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeEmisSheet;
31
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeEmisSheet;
30
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeSheet;
32
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeSheet;
31
import org.openconcerto.utils.Tuple2;
33
import org.openconcerto.utils.Tuple2;
32
 
34
 
33
public class GenerationDocumentGestCommPreferencePanel extends AbstractGenerationDocumentPreferencePanel {
35
public class GenerationDocumentGestCommPreferencePanel extends AbstractGenerationDocumentPreferencePanel {
34
 
36
 
35
    public GenerationDocumentGestCommPreferencePanel() {
37
    public GenerationDocumentGestCommPreferencePanel() {
36
        super();
38
        super();
37
        this.mapKeyLabel.put(Tuple2.create(DevisXmlSheet.TEMPLATE_ID, DevisXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("DEVIS"));
39
        this.mapKeyLabel.put(Tuple2.create(DevisXmlSheet.TEMPLATE_ID, DevisXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("DEVIS"));
38
        this.mapKeyLabel.put(Tuple2.create(AvoirClientXmlSheet.TEMPLATE_ID, AvoirClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_CLIENT"));
40
        this.mapKeyLabel.put(Tuple2.create(AvoirClientXmlSheet.TEMPLATE_ID, AvoirClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_CLIENT"));
39
 
41
 
40
        this.mapKeyLabel.put(Tuple2.create(BonLivraisonXmlSheet.TEMPLATE_ID, BonLivraisonXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_DE_LIVRAISON"));
42
        this.mapKeyLabel.put(Tuple2.create(BonLivraisonXmlSheet.TEMPLATE_ID, BonLivraisonXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_DE_LIVRAISON"));
41
        this.mapKeyLabel.put(Tuple2.create(VenteFactureXmlSheet.TEMPLATE_ID, VenteFactureXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("SAISIE_VENTE_FACTURE"));
43
        this.mapKeyLabel.put(Tuple2.create(VenteFactureXmlSheet.TEMPLATE_ID, VenteFactureXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("SAISIE_VENTE_FACTURE"));
42
        this.mapKeyLabel.put(Tuple2.create(RelanceSheet.TEMPLATE_ID, RelanceSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("RELANCE"));
44
        this.mapKeyLabel.put(Tuple2.create(RelanceSheet.TEMPLATE_ID, RelanceSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("RELANCE"));
43
        this.mapKeyLabel.put(Tuple2.create(BonReceptionXmlSheet.TEMPLATE_ID, BonReceptionXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_RECEPTION"));
45
        this.mapKeyLabel.put(Tuple2.create(BonReceptionXmlSheet.TEMPLATE_ID, BonReceptionXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_RECEPTION"));
44
        this.mapKeyLabel.put(Tuple2.create(CommandeXmlSheet.TEMPLATE_ID, CommandeXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE"));
46
        this.mapKeyLabel.put(Tuple2.create(CommandeXmlSheet.TEMPLATE_ID, CommandeXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE"));
45
        this.mapKeyLabel.put(Tuple2.create(CommandeClientXmlSheet.TEMPLATE_ID, CommandeClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE_CLIENT"));
47
        this.mapKeyLabel.put(Tuple2.create(CommandeClientXmlSheet.TEMPLATE_ID, CommandeClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE_CLIENT"));
-
 
48
        this.mapKeyLabel.put(Tuple2.create(FicheArticleXmlSheet.TEMPLATE_ID, FicheArticleXmlSheet.TEMPLATE_PROPERTY_NAME), "Fiche article");
-
 
49
        this.mapKeyLabel.put(Tuple2.create(FicheClientXmlSheet.TEMPLATE_ID, FicheClientXmlSheet.TEMPLATE_PROPERTY_NAME), "Fiche client");
46
        this.mapKeyLabel.put(Tuple2.create(AvoirFournisseurXmlSheet.TEMPLATE_ID, AvoirFournisseurXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_FOURNISSEUR"));
50
        this.mapKeyLabel.put(Tuple2.create(AvoirFournisseurXmlSheet.TEMPLATE_ID, AvoirFournisseurXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_FOURNISSEUR"));
47
        this.mapKeyLabel.put(Tuple2.create(CourrierClientSheet.TEMPLATE_ID, CourrierClientSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COURRIER_CLIENT"));
51
        this.mapKeyLabel.put(Tuple2.create(CourrierClientSheet.TEMPLATE_ID, CourrierClientSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COURRIER_CLIENT"));
48
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeEmisSheet.TEMPLATE_ID, ReleveChequeEmisSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque émis");
52
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeEmisSheet.TEMPLATE_ID, ReleveChequeEmisSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque émis");
49
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeSheet.TEMPLATE_ID, ReleveChequeSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque");
53
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeSheet.TEMPLATE_ID, ReleveChequeSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque");
50
        for (Tuple2<String, String> t : mapKeyLabelCustom.keySet()) {
54
        for (Tuple2<String, String> t : mapKeyLabelCustom.keySet()) {
51
            this.mapKeyLabel.put(t, mapKeyLabelCustom.get(t));
55
            this.mapKeyLabel.put(t, mapKeyLabelCustom.get(t));
52
        }
56
        }
53
        // this.mapKeyLabel.put(SheetXml.tupleDefault.get0(), SheetXml.tupleDefault.get1());
57
        // this.mapKeyLabel.put(SheetXml.tupleDefault.get0(), SheetXml.tupleDefault.get1());
54
        // uiInit();
58
        // uiInit();
55
    }
59
    }
56
 
60
 
57
    protected static Map<Tuple2<String, String>, String> mapKeyLabelCustom = new HashMap<Tuple2<String, String>, String>();
61
    protected static Map<Tuple2<String, String>, String> mapKeyLabelCustom = new HashMap<Tuple2<String, String>, String>();
58
 
62
 
59
    public String getTitleName() {
63
    public String getTitleName() {
60
        return "Destination des documents générés";
64
        return "Destination des documents générés";
61
    }
65
    }
62
 
66
 
63
    public static void addPref(Tuple2<String, String> template, String label) {
67
    public static void addPref(Tuple2<String, String> template, String label) {
64
        mapKeyLabelCustom.put(template, label);
68
        mapKeyLabelCustom.put(template, label);
65
    }
69
    }
66
}
70
}