OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 177 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
61 ilm 1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
182 ilm 4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
61 ilm 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
 /*
15
 * Créé le 6 mars 2012
16
 */
17
package org.openconcerto.erp.preferences;
18
 
19
import org.openconcerto.erp.config.ComptaPropsConfiguration;
156 ilm 20
import org.openconcerto.erp.core.common.ui.AbstractVenteArticleItemTable;
61 ilm 21
import org.openconcerto.sql.Configuration;
22
import org.openconcerto.sql.preferences.SQLPreferences;
23
import org.openconcerto.ui.preferences.JavaPrefPreferencePanel;
24
import org.openconcerto.ui.preferences.PrefView;
25
import org.openconcerto.utils.PrefType;
26
 
27
public class GestionArticleGlobalPreferencePanel extends JavaPrefPreferencePanel {
182 ilm 28
    public static String ACTIVER_DECLINAISON = "GestionDeclinaison";
61 ilm 29
    public static String STOCK_FACT = "StockOnOrder";
30
    public static String UNITE_VENTE = "UniteVenteActive";
31
    public static String USE_CREATED_ARTICLE = "UseCreatedArticle";
32
    public static String CREATE_ARTICLE_AUTO = "CreateArticleAuto";
149 ilm 33
    public static String ACTIVE_DEMANDE_ACHAT = "ActiveDemandeAchat";
67 ilm 34
    public static String SUPPLIER_PRODUCT_CODE = "SupplierProductCode";
93 ilm 35
    public static String WARNING_STOCK_MIN = "ArticleStockMin";
132 ilm 36
    public static String BOM_STYLE = "BomStyle";
73 ilm 37
    public static String SHOW_PRODUCT_BAR_CODE = "ShowProductBarCode";
80 ilm 38
    public static String ITEM_PACKAGING = "ItemPackaging";
93 ilm 39
    public static String FILTER_BY_FAMILY = "FilterByFamily";
177 ilm 40
    public static String ACTIVE_CALCUL_M2 = "CalculM2";
156 ilm 41
    public static String STOCK_MULTI_DEPOT = "MultiDepot";
132 ilm 42
    public static String CAN_EXPAND_NOMENCLATURE_VT = "CanExpandNomenclature";
43
    public static String CAN_EXPAND_NOMENCLATURE_HA = "CanExpandNomenclaturePurchase";
182 ilm 44
    public static String SHOW_LIST_COMPTE = "ShowListProductCompte";
45
    public static String SHOW_LIST_TAXE = "ShowListProductTaxe";
46
    public static String SHOW_LIST_FAMILLE = "ShowListProductFamille";
47
    public static String SHOW_LIST_FOURNISSEUR = "ShowListProductFournisseur";
61 ilm 48
 
49
    public GestionArticleGlobalPreferencePanel() {
50
        super("Gestion des articles", null);
51
        setPrefs(new SQLPreferences(((ComptaPropsConfiguration) Configuration.getInstance()).getRootSociete()));
52
    }
53
 
54
    @Override
55
    protected void addViews() {
177 ilm 56
        PrefView<Boolean> viewCalcul = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer le calcul au m2 (L x l)", GestionArticleGlobalPreferencePanel.ACTIVE_CALCUL_M2);
57
        viewCalcul.setDefaultValue(Boolean.FALSE);
58
        this.addView(viewCalcul);
67 ilm 59
 
156 ilm 60
        PrefView<Boolean> viewShowDevise = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer plusieurs devises", AbstractVenteArticleItemTable.ARTICLE_SHOW_DEVISE);
61
        viewShowDevise.setDefaultValue(Boolean.FALSE);
62
        this.addView(viewShowDevise);
63
 
132 ilm 64
        PrefView<Boolean> viewExpandNom = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Permettre d'applatir, d'exposer, d'éclater les articles dans les pièces commerciales de vente",
65
                CAN_EXPAND_NOMENCLATURE_VT);
66
        viewExpandNom.setDefaultValue(Boolean.TRUE);
67
        this.addView(viewExpandNom);
68
 
69
        PrefView<Boolean> viewExpandNomHA = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Permettre d'applatir, d'exposer, d'éclater les articles dans les pièces commerciales d'achat",
70
                CAN_EXPAND_NOMENCLATURE_HA);
71
        viewExpandNomHA.setDefaultValue(Boolean.TRUE);
72
        this.addView(viewExpandNomHA);
73
 
149 ilm 74
        PrefView<Boolean> viewDmdAchat = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les demandes d'achats", ACTIVE_DEMANDE_ACHAT);
75
        viewDmdAchat.setDefaultValue(Boolean.FALSE);
76
        this.addView(viewDmdAchat);
77
 
67 ilm 78
        PrefView<Boolean> viewAchat = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les codes articles fournisseurs", SUPPLIER_PRODUCT_CODE);
79
        viewAchat.setDefaultValue(Boolean.FALSE);
80
        this.addView(viewAchat);
81
 
93 ilm 82
        PrefView<Boolean> viewStockWarning = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les alertes de stocks minimum", WARNING_STOCK_MIN);
83
        viewStockWarning.setDefaultValue(Boolean.TRUE);
84
        this.addView(viewStockWarning);
85
 
61 ilm 86
        PrefView<Boolean> view = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les sorties de stock avec les factures et non les bons de livraison", STOCK_FACT);
87
        view.setDefaultValue(Boolean.TRUE);
88
        this.addView(view);
89
 
182 ilm 90
        PrefView<Boolean> viewGestionDeclinaison = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Activer la gestion des déclinaisons", ACTIVER_DECLINAISON);
91
        viewGestionDeclinaison.setDefaultValue(Boolean.FALSE);
92
        this.addView(viewGestionDeclinaison);
93
 
156 ilm 94
        PrefView<Boolean> viewMultiStock = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Activer la gestion multidépôt", STOCK_MULTI_DEPOT);
95
        viewMultiStock.setDefaultValue(Boolean.FALSE);
96
        this.addView(viewMultiStock);
97
 
61 ilm 98
        PrefView<Boolean> view2 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer différentes unités de vente", UNITE_VENTE);
99
        view2.setDefaultValue(Boolean.TRUE);
100
        this.addView(view2);
101
 
80 ilm 102
        PrefView<Boolean> view6 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les colis", ITEM_PACKAGING);
103
        view6.setDefaultValue(Boolean.FALSE);
104
        this.addView(view6);
105
 
61 ilm 106
        PrefView<Boolean> view3 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Utiliser uniquement des articles existant", USE_CREATED_ARTICLE);
107
        view3.setDefaultValue(Boolean.FALSE);
108
        this.addView(view3);
109
 
93 ilm 110
        PrefView<Boolean> viewFilter = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Filtrer les articles par familles dans le corps des piéces commerciales", FILTER_BY_FAMILY);
111
        viewFilter.setDefaultValue(Boolean.FALSE);
112
        this.addView(viewFilter);
113
 
61 ilm 114
        PrefView<Boolean> view4 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Créer automatiquement les articles (si il n'y a aucune correspondance CODE, DESIGNATION)", CREATE_ARTICLE_AUTO);
115
        view4.setDefaultValue(Boolean.TRUE);
116
        this.addView(view4);
67 ilm 117
 
73 ilm 118
        PrefView<Boolean> view5 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher le code barre des articles dans les sélecteurs", SHOW_PRODUCT_BAR_CODE);
67 ilm 119
        view5.setDefaultValue(Boolean.FALSE);
120
        this.addView(view5);
73 ilm 121
 
182 ilm 122
        PrefView<Boolean> viewCompte = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les comptes comptables des articles dans les listes", SHOW_LIST_COMPTE);
123
        viewCompte.setDefaultValue(Boolean.FALSE);
124
        this.addView(viewCompte);
125
        PrefView<Boolean> viewTaxe = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher la TVA des articles dans les listes", SHOW_LIST_TAXE);
126
        viewTaxe.setDefaultValue(Boolean.FALSE);
127
        this.addView(viewTaxe);
128
        PrefView<Boolean> viewFamille = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les familles des articles dans les listes", SHOW_LIST_FAMILLE);
129
        viewFamille.setDefaultValue(Boolean.FALSE);
130
        this.addView(viewFamille);
131
        PrefView<Boolean> viewFournisseur = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les fournisseurs des articles dans les listes", SHOW_LIST_FOURNISSEUR);
132
        viewFournisseur.setDefaultValue(Boolean.FALSE);
133
        this.addView(viewFournisseur);
134
 
61 ilm 135
    }
136
}