OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 25 | Rev 61 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25 Rev 28
Line 24... Line 24...
24
import org.openconcerto.erp.generationDoc.gestcomm.RelanceSheet;
24
import org.openconcerto.erp.generationDoc.gestcomm.RelanceSheet;
25
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeEmisSheet;
25
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeEmisSheet;
26
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeSheet;
26
import org.openconcerto.erp.generationDoc.gestcomm.ReleveChequeSheet;
27
import org.openconcerto.sql.Configuration;
27
import org.openconcerto.sql.Configuration;
28
import org.openconcerto.utils.StringUtils;
28
import org.openconcerto.utils.StringUtils;
-
 
29
import org.openconcerto.utils.Tuple2;
29
 
30
 
30
public class GenerationDocumentGestCommPreferencePanel extends AbstractGenerationDocumentPreferencePanel {
31
public class GenerationDocumentGestCommPreferencePanel extends AbstractGenerationDocumentPreferencePanel {
31
 
32
 
32
    public GenerationDocumentGestCommPreferencePanel() {
33
    public GenerationDocumentGestCommPreferencePanel() {
33
        super();
34
        super();
34
        this.mapKeyLabel.put(DevisXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("DEVIS"));
35
        this.mapKeyLabel.put(Tuple2.create(DevisXmlSheet.TEMPLATE_ID, DevisXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("DEVIS"));
35
        this.mapKeyLabel.put(AvoirClientXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("AVOIR_CLIENT"));
36
        this.mapKeyLabel.put(Tuple2.create(AvoirClientXmlSheet.TEMPLATE_ID, AvoirClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_CLIENT"));
36
 
37
 
37
        this.mapKeyLabel.put(BonLivraisonXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("BON_DE_LIVRAISON"));
38
        this.mapKeyLabel.put(Tuple2.create(BonLivraisonXmlSheet.TEMPLATE_ID, BonLivraisonXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("BON_DE_LIVRAISON"));
38
        this.mapKeyLabel.put(VenteFactureXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("SAISIE_VENTE_FACTURE"));
39
        this.mapKeyLabel.put(Tuple2.create(VenteFactureXmlSheet.TEMPLATE_ID, VenteFactureXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("SAISIE_VENTE_FACTURE"));
39
        this.mapKeyLabel.put(RelanceSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("RELANCE"));
40
        this.mapKeyLabel.put(Tuple2.create(RelanceSheet.TEMPLATE_ID, RelanceSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("RELANCE"));
40
        this.mapKeyLabel.put(CommandeXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("COMMANDE"));
41
        this.mapKeyLabel.put(Tuple2.create(CommandeXmlSheet.TEMPLATE_ID, CommandeXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE"));
41
        this.mapKeyLabel.put(CommandeClientXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("COMMANDE_CLIENT"));
42
        this.mapKeyLabel.put(Tuple2.create(CommandeClientXmlSheet.TEMPLATE_ID, CommandeClientXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COMMANDE_CLIENT"));
42
        this.mapKeyLabel.put(AvoirFournisseurXmlSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("AVOIR_FOURNISSEUR"));
43
        this.mapKeyLabel.put(Tuple2.create(AvoirFournisseurXmlSheet.TEMPLATE_ID, AvoirFournisseurXmlSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("AVOIR_FOURNISSEUR"));
43
        this.mapKeyLabel.put(CourrierClientSheet.TEMPLATE_PROPERTY_NAME, getLabelFromTable("COURRIER_CLIENT"));
44
        this.mapKeyLabel.put(Tuple2.create(CourrierClientSheet.TEMPLATE_ID, CourrierClientSheet.TEMPLATE_PROPERTY_NAME), getLabelFromTable("COURRIER_CLIENT"));
44
        this.mapKeyLabel.put(ReleveChequeEmisSheet.TEMPLATE_PROPERTY_NAME, "Relevé chèque émis");
45
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeEmisSheet.TEMPLATE_ID, ReleveChequeEmisSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque émis");
45
        this.mapKeyLabel.put(ReleveChequeSheet.TEMPLATE_PROPERTY_NAME, "Relevé chèque");
46
        this.mapKeyLabel.put(Tuple2.create(ReleveChequeSheet.TEMPLATE_ID, ReleveChequeSheet.TEMPLATE_PROPERTY_NAME), "Relevé chèque");
46
        // this.mapKeyLabel.put(SheetXml.tupleDefault.get0(), SheetXml.tupleDefault.get1());
47
        // this.mapKeyLabel.put(SheetXml.tupleDefault.get0(), SheetXml.tupleDefault.get1());
47
        // uiInit();
48
        // uiInit();
48
    }
49
    }
49
 
50
 
50
    private String getLabelFromTable(String tableName) {
-
 
51
        String pluralName = Configuration.getInstance().getDirectory().getElement(tableName).getPluralName();
-
 
52
        pluralName = StringUtils.firstUp(pluralName);
-
 
53
        return pluralName;
-
 
54
    }
51
    
55
 
52
 
56
    public String getTitleName() {
53
    public String getTitleName() {
57
        return "Destination des documents générés";
54
        return "Destination des documents générés";
58
    }
55
    }
59
}
56
}