OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | 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
 *
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
 /*
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 {
28
    public static String STOCK_FACT = "StockOnOrder";
29
    public static String UNITE_VENTE = "UniteVenteActive";
30
    public static String USE_CREATED_ARTICLE = "UseCreatedArticle";
31
    public static String CREATE_ARTICLE_AUTO = "CreateArticleAuto";
149 ilm 32
    public static String ACTIVE_DEMANDE_ACHAT = "ActiveDemandeAchat";
67 ilm 33
    public static String SUPPLIER_PRODUCT_CODE = "SupplierProductCode";
93 ilm 34
    public static String WARNING_STOCK_MIN = "ArticleStockMin";
132 ilm 35
    public static String BOM_STYLE = "BomStyle";
73 ilm 36
    public static String SHOW_PRODUCT_BAR_CODE = "ShowProductBarCode";
80 ilm 37
    public static String ITEM_PACKAGING = "ItemPackaging";
93 ilm 38
    public static String FILTER_BY_FAMILY = "FilterByFamily";
177 ilm 39
    public static String ACTIVE_CALCUL_M2 = "CalculM2";
156 ilm 40
    public static String STOCK_MULTI_DEPOT = "MultiDepot";
132 ilm 41
    public static String CAN_EXPAND_NOMENCLATURE_VT = "CanExpandNomenclature";
42
    public static String CAN_EXPAND_NOMENCLATURE_HA = "CanExpandNomenclaturePurchase";
61 ilm 43
 
44
    public GestionArticleGlobalPreferencePanel() {
45
        super("Gestion des articles", null);
46
        setPrefs(new SQLPreferences(((ComptaPropsConfiguration) Configuration.getInstance()).getRootSociete()));
47
    }
48
 
49
    @Override
50
    protected void addViews() {
177 ilm 51
        PrefView<Boolean> viewCalcul = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer le calcul au m2 (L x l)", GestionArticleGlobalPreferencePanel.ACTIVE_CALCUL_M2);
52
        viewCalcul.setDefaultValue(Boolean.FALSE);
53
        this.addView(viewCalcul);
67 ilm 54
 
156 ilm 55
        PrefView<Boolean> viewShowDevise = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer plusieurs devises", AbstractVenteArticleItemTable.ARTICLE_SHOW_DEVISE);
56
        viewShowDevise.setDefaultValue(Boolean.FALSE);
57
        this.addView(viewShowDevise);
58
 
132 ilm 59
        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",
60
                CAN_EXPAND_NOMENCLATURE_VT);
61
        viewExpandNom.setDefaultValue(Boolean.TRUE);
62
        this.addView(viewExpandNom);
63
 
64
        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",
65
                CAN_EXPAND_NOMENCLATURE_HA);
66
        viewExpandNomHA.setDefaultValue(Boolean.TRUE);
67
        this.addView(viewExpandNomHA);
68
 
149 ilm 69
        PrefView<Boolean> viewDmdAchat = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les demandes d'achats", ACTIVE_DEMANDE_ACHAT);
70
        viewDmdAchat.setDefaultValue(Boolean.FALSE);
71
        this.addView(viewDmdAchat);
72
 
67 ilm 73
        PrefView<Boolean> viewAchat = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les codes articles fournisseurs", SUPPLIER_PRODUCT_CODE);
74
        viewAchat.setDefaultValue(Boolean.FALSE);
75
        this.addView(viewAchat);
76
 
93 ilm 77
        PrefView<Boolean> viewStockWarning = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les alertes de stocks minimum", WARNING_STOCK_MIN);
78
        viewStockWarning.setDefaultValue(Boolean.TRUE);
79
        this.addView(viewStockWarning);
80
 
61 ilm 81
        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);
82
        view.setDefaultValue(Boolean.TRUE);
83
        this.addView(view);
84
 
156 ilm 85
        PrefView<Boolean> viewMultiStock = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Activer la gestion multidépôt", STOCK_MULTI_DEPOT);
86
        viewMultiStock.setDefaultValue(Boolean.FALSE);
87
        this.addView(viewMultiStock);
88
 
61 ilm 89
        PrefView<Boolean> view2 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer différentes unités de vente", UNITE_VENTE);
90
        view2.setDefaultValue(Boolean.TRUE);
91
        this.addView(view2);
92
 
80 ilm 93
        PrefView<Boolean> view6 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les colis", ITEM_PACKAGING);
94
        view6.setDefaultValue(Boolean.FALSE);
95
        this.addView(view6);
96
 
61 ilm 97
        PrefView<Boolean> view3 = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Utiliser uniquement des articles existant", USE_CREATED_ARTICLE);
98
        view3.setDefaultValue(Boolean.FALSE);
99
        this.addView(view3);
100
 
93 ilm 101
        PrefView<Boolean> viewFilter = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Filtrer les articles par familles dans le corps des piéces commerciales", FILTER_BY_FAMILY);
102
        viewFilter.setDefaultValue(Boolean.FALSE);
103
        this.addView(viewFilter);
104
 
61 ilm 105
        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);
106
        view4.setDefaultValue(Boolean.TRUE);
107
        this.addView(view4);
67 ilm 108
 
73 ilm 109
        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 110
        view5.setDefaultValue(Boolean.FALSE);
111
        this.addView(view5);
73 ilm 112
 
61 ilm 113
    }
114
}