OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 94 | 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.preferences;
15
 
61 ilm 16
import java.util.HashMap;
17
import java.util.Map;
18
 
149 ilm 19
import org.openconcerto.erp.core.customerrelationship.customer.report.FicheClientXmlSheet;
18 ilm 20
import org.openconcerto.erp.core.sales.invoice.report.VenteFactureXmlSheet;
21
import org.openconcerto.erp.core.sales.order.report.CommandeClientXmlSheet;
22
import org.openconcerto.erp.core.sales.quote.report.DevisXmlSheet;
23
import org.openconcerto.erp.core.sales.shipment.report.BonLivraisonXmlSheet;
24
import org.openconcerto.erp.generationDoc.gestcomm.AvoirClientXmlSheet;
25
import org.openconcerto.erp.generationDoc.gestcomm.AvoirFournisseurXmlSheet;
94 ilm 26
import org.openconcerto.erp.generationDoc.gestcomm.BonReceptionXmlSheet;
18 ilm 27
import org.openconcerto.erp.generationDoc.gestcomm.CommandeXmlSheet;
28
import org.openconcerto.erp.generationDoc.gestcomm.CourrierClientSheet;
149 ilm 29
import org.openconcerto.erp.generationDoc.gestcomm.FicheArticleXmlSheet;
18 ilm 30
import org.openconcerto.erp.generationDoc.gestcomm.RelanceSheet;
31
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeEmisSheet;
32
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeSheet;
28 ilm 33
import org.openconcerto.utils.Tuple2;
18 ilm 34
 
35
public class GenerationDocumentGestCommPreferencePanel extends AbstractGenerationDocumentPreferencePanel {
36
 
37
    public GenerationDocumentGestCommPreferencePanel() {
38
        super();
28 ilm 39
        this.mapKeyLabel.put(Tuple2.create(DevisXmlSheet.TEMPLATE_ID, DevisXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("DEVIS"));
40
        this.mapKeyLabel.put(Tuple2.create(AvoirClientXmlSheet.TEMPLATE_ID, AvoirClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_CLIENT"));
25 ilm 41
 
28 ilm 42
        this.mapKeyLabel.put(Tuple2.create(BonLivraisonXmlSheet.TEMPLATE_ID, BonLivraisonXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_DE_LIVRAISON"));
43
        this.mapKeyLabel.put(Tuple2.create(VenteFactureXmlSheet.TEMPLATE_ID, VenteFactureXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("SAISIE_VENTE_FACTURE"));
44
        this.mapKeyLabel.put(Tuple2.create(RelanceSheet.TEMPLATE_ID, RelanceSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("RELANCE"));
94 ilm 45
        this.mapKeyLabel.put(Tuple2.create(BonReceptionXmlSheet.TEMPLATE_ID, BonReceptionXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_RECEPTION"));
28 ilm 46
        this.mapKeyLabel.put(Tuple2.create(CommandeXmlSheet.TEMPLATE_ID, CommandeXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE"));
47
        this.mapKeyLabel.put(Tuple2.create(CommandeClientXmlSheet.TEMPLATE_ID, CommandeClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE_CLIENT"));
149 ilm 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");
28 ilm 50
        this.mapKeyLabel.put(Tuple2.create(AvoirFournisseurXmlSheet.TEMPLATE_ID, AvoirFournisseurXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_FOURNISSEUR"));
51
        this.mapKeyLabel.put(Tuple2.create(CourrierClientSheet.TEMPLATE_ID, CourrierClientSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COURRIER_CLIENT"));
52
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeEmisSheet.TEMPLATE_ID, ReleveChequeEmisSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque émis");
53
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeSheet.TEMPLATE_ID, ReleveChequeSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque");
61 ilm 54
        for (Tuple2<String, String> t : mapKeyLabelCustom.keySet()) {
55
            this.mapKeyLabel.put(t, mapKeyLabelCustom.get(t));
56
        }
25 ilm 57
        // this.mapKeyLabel.put(SheetXml.tupleDefault.get0(), SheetXml.tupleDefault.get1());
19 ilm 58
        // uiInit();
18 ilm 59
    }
60
 
61 ilm 61
    protected static Map<Tuple2<String, String>, String> mapKeyLabelCustom = new HashMap<Tuple2<String, String>, String>();
25 ilm 62
 
18 ilm 63
    public String getTitleName() {
64
        return "Destination des documents générés";
65
    }
61 ilm 66
 
67
    public static void addPref(Tuple2<String, String> template, String label) {
68
        mapKeyLabelCustom.put(template, label);
69
    }
18 ilm 70
}