83 |
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;
|
142 |
ilm |
20 |
import org.openconcerto.erp.core.common.ui.AbstractArticleItemTable;
|
83 |
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 |
import javax.swing.ButtonGroup;
|
|
|
28 |
import javax.swing.JCheckBox;
|
|
|
29 |
|
|
|
30 |
public class GestionCommercialeGlobalPreferencePanel extends JavaPrefPreferencePanel {
|
|
|
31 |
public static String TRANSFERT_REF = "TransfertRef";
|
|
|
32 |
public static String TRANSFERT_MULTI_REF = "TransfertMultiRef";
|
|
|
33 |
public static String TRANSFERT_NO_REF = "TransfertNoRef";
|
93 |
ilm |
34 |
public static String ORDER_PACKAGING_MANAGEMENT = "OrderPackagingManagement";
|
94 |
ilm |
35 |
public static String ADDRESS_SPEC = "AddressSpec";
|
|
|
36 |
public static String GESTION_TIMBRE_FISCAL = "GestionTimbreFiscal";
|
|
|
37 |
public static String TAUX_TIMBRE_FISCAL = "TauxTimbreFiscal";
|
142 |
ilm |
38 |
public static String BARCODE_INSERTION = "BarcodeInsertion";
|
144 |
ilm |
39 |
public static String CREATE_ECR_CHQ = "CreateEcritureCheque";
|
|
|
40 |
public static String CHIFFRAGE_COMMANDE_CLIENT = "ChiffrageCmdClient";
|
83 |
ilm |
41 |
|
|
|
42 |
public GestionCommercialeGlobalPreferencePanel() {
|
|
|
43 |
super("Gestion des pièces commerciales", null);
|
|
|
44 |
setPrefs(new SQLPreferences(((ComptaPropsConfiguration) Configuration.getInstance()).getRootSociete()));
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
@Override
|
|
|
48 |
protected void addViews() {
|
|
|
49 |
PrefView<Boolean> viewTransfert = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Transférer les numéros des pièces commeriales en tant que référence", TRANSFERT_REF);
|
|
|
50 |
viewTransfert.setDefaultValue(Boolean.TRUE);
|
|
|
51 |
this.addView(viewTransfert);
|
|
|
52 |
|
|
|
53 |
PrefView<Boolean> viewMultiTransfert = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Transférer les numéros des pièces commerciales dans le corps", TRANSFERT_MULTI_REF);
|
|
|
54 |
viewMultiTransfert.setDefaultValue(Boolean.FALSE);
|
|
|
55 |
this.addView(viewMultiTransfert);
|
|
|
56 |
|
|
|
57 |
PrefView<Boolean> viewNo = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Ne pas transférer les numéros des pièces commerciales", TRANSFERT_NO_REF);
|
|
|
58 |
viewNo.setDefaultValue(Boolean.FALSE);
|
|
|
59 |
this.addView(viewNo);
|
|
|
60 |
|
93 |
ilm |
61 |
PrefView<Boolean> orderPackaging = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer la préparation des commandes clients", ORDER_PACKAGING_MANAGEMENT);
|
|
|
62 |
orderPackaging.setDefaultValue(Boolean.TRUE);
|
|
|
63 |
this.addView(orderPackaging);
|
|
|
64 |
|
144 |
ilm |
65 |
PrefView<Boolean> orderQuoting = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer le chiffrage détaillés des commandes clients", CHIFFRAGE_COMMANDE_CLIENT);
|
|
|
66 |
orderQuoting.setDefaultValue(Boolean.FALSE);
|
|
|
67 |
this.addView(orderQuoting);
|
|
|
68 |
|
94 |
ilm |
69 |
PrefView<Boolean> addressSpec = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les sélecteurs d'adresse spécifique", ADDRESS_SPEC);
|
|
|
70 |
addressSpec.setDefaultValue(Boolean.TRUE);
|
|
|
71 |
this.addView(addressSpec);
|
|
|
72 |
|
|
|
73 |
PrefView<Boolean> gestTimbreFisc = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Activer la gestion du timbre fiscal", GESTION_TIMBRE_FISCAL);
|
|
|
74 |
gestTimbreFisc.setDefaultValue(Boolean.FALSE);
|
|
|
75 |
this.addView(gestTimbreFisc);
|
|
|
76 |
|
|
|
77 |
PrefView<Double> tauxTimbreFisc = new PrefView<Double>(PrefType.DOUBLE_TYPE, "Taux du timbre fiscal", TAUX_TIMBRE_FISCAL);
|
|
|
78 |
tauxTimbreFisc.setDefaultValue(Double.valueOf(1));
|
|
|
79 |
this.addView(tauxTimbreFisc);
|
|
|
80 |
|
142 |
ilm |
81 |
PrefView<Boolean> ecoColumns = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les colonnes éco-contributions", AbstractArticleItemTable.SHOW_ECO_CONTRIBUTION_COLUMNS);
|
|
|
82 |
ecoColumns.setDefaultValue(Boolean.FALSE);
|
|
|
83 |
this.addView(ecoColumns);
|
|
|
84 |
|
|
|
85 |
PrefView<Boolean> ecoTotal = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher le total de l'éco-contribution", AbstractArticleItemTable.SHOW_TOTAL_ECO_CONTRIBUTION);
|
|
|
86 |
ecoTotal.setDefaultValue(Boolean.FALSE);
|
|
|
87 |
this.addView(ecoTotal);
|
|
|
88 |
|
|
|
89 |
PrefView<Boolean> barcodeInsert = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Insérer des lignes dans le corps avec la douchette", BARCODE_INSERTION);
|
|
|
90 |
barcodeInsert.setDefaultValue(Boolean.FALSE);
|
|
|
91 |
this.addView(barcodeInsert);
|
|
|
92 |
|
144 |
ilm |
93 |
PrefView<Boolean> createEcrChq = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Créer les écritures comptables à la réception des chèques clients", CREATE_ECR_CHQ);
|
|
|
94 |
createEcrChq.setDefaultValue(Boolean.TRUE);
|
|
|
95 |
this.addView(createEcrChq);
|
|
|
96 |
|
83 |
ilm |
97 |
ButtonGroup group = new ButtonGroup();
|
|
|
98 |
group.add((JCheckBox) viewMultiTransfert.getVW().getComp());
|
|
|
99 |
group.add((JCheckBox) viewTransfert.getVW().getComp());
|
|
|
100 |
group.add((JCheckBox) viewNo.getVW().getComp());
|
|
|
101 |
|
|
|
102 |
}
|
|
|
103 |
}
|