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";
|
174 |
ilm |
32 |
public static String COMMANDE_FOURNISSEUR_EN_COURS = "CommandeFournisseurEncours";
|
83 |
ilm |
33 |
public static String TRANSFERT_MULTI_REF = "TransfertMultiRef";
|
|
|
34 |
public static String TRANSFERT_NO_REF = "TransfertNoRef";
|
149 |
ilm |
35 |
public static String ACOMPTE_DEVIS = "AcompteDevis";
|
93 |
ilm |
36 |
public static String ORDER_PACKAGING_MANAGEMENT = "OrderPackagingManagement";
|
94 |
ilm |
37 |
public static String ADDRESS_SPEC = "AddressSpec";
|
174 |
ilm |
38 |
public static String CATEGORIE_COMPTABLE_SPEC = "CategorieComptableSpec";
|
94 |
ilm |
39 |
public static String GESTION_TIMBRE_FISCAL = "GestionTimbreFiscal";
|
|
|
40 |
public static String TAUX_TIMBRE_FISCAL = "TauxTimbreFiscal";
|
142 |
ilm |
41 |
public static String BARCODE_INSERTION = "BarcodeInsertion";
|
144 |
ilm |
42 |
public static String CREATE_ECR_CHQ = "CreateEcritureCheque";
|
|
|
43 |
public static String CHIFFRAGE_COMMANDE_CLIENT = "ChiffrageCmdClient";
|
149 |
ilm |
44 |
public static String IMPUT_ECART = "ImputEcart";
|
156 |
ilm |
45 |
public static String FRAIS_DOCUMENT = "GestionFraisDocuments";
|
177 |
ilm |
46 |
public static String COMPTE_CLIENT_AUTO = "CompteClientAuto";
|
83 |
ilm |
47 |
|
|
|
48 |
public GestionCommercialeGlobalPreferencePanel() {
|
|
|
49 |
super("Gestion des pièces commerciales", null);
|
|
|
50 |
setPrefs(new SQLPreferences(((ComptaPropsConfiguration) Configuration.getInstance()).getRootSociete()));
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
@Override
|
|
|
54 |
protected void addViews() {
|
177 |
ilm |
55 |
PrefView<Boolean> viewCompteClientAuto = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Créer les comptes clients en automatique à la création", COMPTE_CLIENT_AUTO);
|
|
|
56 |
viewCompteClientAuto.setDefaultValue(Boolean.FALSE);
|
|
|
57 |
this.addView(viewCompteClientAuto);
|
|
|
58 |
|
83 |
ilm |
59 |
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);
|
|
|
60 |
viewTransfert.setDefaultValue(Boolean.TRUE);
|
|
|
61 |
this.addView(viewTransfert);
|
|
|
62 |
|
|
|
63 |
PrefView<Boolean> viewMultiTransfert = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Transférer les numéros des pièces commerciales dans le corps", TRANSFERT_MULTI_REF);
|
|
|
64 |
viewMultiTransfert.setDefaultValue(Boolean.FALSE);
|
|
|
65 |
this.addView(viewMultiTransfert);
|
|
|
66 |
|
|
|
67 |
PrefView<Boolean> viewNo = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Ne pas transférer les numéros des pièces commerciales", TRANSFERT_NO_REF);
|
|
|
68 |
viewNo.setDefaultValue(Boolean.FALSE);
|
|
|
69 |
this.addView(viewNo);
|
|
|
70 |
|
93 |
ilm |
71 |
PrefView<Boolean> orderPackaging = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer la préparation des commandes clients", ORDER_PACKAGING_MANAGEMENT);
|
|
|
72 |
orderPackaging.setDefaultValue(Boolean.TRUE);
|
|
|
73 |
this.addView(orderPackaging);
|
|
|
74 |
|
144 |
ilm |
75 |
PrefView<Boolean> orderQuoting = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer le chiffrage détaillés des commandes clients", CHIFFRAGE_COMMANDE_CLIENT);
|
|
|
76 |
orderQuoting.setDefaultValue(Boolean.FALSE);
|
|
|
77 |
this.addView(orderQuoting);
|
|
|
78 |
|
174 |
ilm |
79 |
PrefView<Boolean> cmdEnCours = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Activer la gestion des commandes fournisseurs en cours", COMMANDE_FOURNISSEUR_EN_COURS);
|
|
|
80 |
cmdEnCours.setDefaultValue(Boolean.FALSE);
|
|
|
81 |
this.addView(cmdEnCours);
|
|
|
82 |
|
149 |
ilm |
83 |
PrefView<Boolean> viewAcompteDevis = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer les acomptes sur devis", ACOMPTE_DEVIS);
|
|
|
84 |
viewAcompteDevis.setDefaultValue(Boolean.FALSE);
|
|
|
85 |
this.addView(viewAcompteDevis);
|
|
|
86 |
|
94 |
ilm |
87 |
PrefView<Boolean> addressSpec = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les sélecteurs d'adresse spécifique", ADDRESS_SPEC);
|
|
|
88 |
addressSpec.setDefaultValue(Boolean.TRUE);
|
|
|
89 |
this.addView(addressSpec);
|
177 |
ilm |
90 |
|
174 |
ilm |
91 |
PrefView<Boolean> catComptableSpec = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les sélecteurs de catégorie comptable spécifique", CATEGORIE_COMPTABLE_SPEC);
|
|
|
92 |
catComptableSpec.setDefaultValue(Boolean.FALSE);
|
|
|
93 |
this.addView(catComptableSpec);
|
94 |
ilm |
94 |
|
|
|
95 |
PrefView<Boolean> gestTimbreFisc = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Activer la gestion du timbre fiscal", GESTION_TIMBRE_FISCAL);
|
|
|
96 |
gestTimbreFisc.setDefaultValue(Boolean.FALSE);
|
|
|
97 |
this.addView(gestTimbreFisc);
|
|
|
98 |
|
|
|
99 |
PrefView<Double> tauxTimbreFisc = new PrefView<Double>(PrefType.DOUBLE_TYPE, "Taux du timbre fiscal", TAUX_TIMBRE_FISCAL);
|
|
|
100 |
tauxTimbreFisc.setDefaultValue(Double.valueOf(1));
|
|
|
101 |
this.addView(tauxTimbreFisc);
|
|
|
102 |
|
142 |
ilm |
103 |
PrefView<Boolean> ecoColumns = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher les colonnes éco-contributions", AbstractArticleItemTable.SHOW_ECO_CONTRIBUTION_COLUMNS);
|
|
|
104 |
ecoColumns.setDefaultValue(Boolean.FALSE);
|
|
|
105 |
this.addView(ecoColumns);
|
|
|
106 |
|
156 |
ilm |
107 |
PrefView<Boolean> fraisDoc = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Gérer des frais sur la création des documents clients", FRAIS_DOCUMENT);
|
|
|
108 |
fraisDoc.setDefaultValue(Boolean.FALSE);
|
|
|
109 |
this.addView(fraisDoc);
|
|
|
110 |
|
142 |
ilm |
111 |
PrefView<Boolean> ecoTotal = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Afficher le total de l'éco-contribution", AbstractArticleItemTable.SHOW_TOTAL_ECO_CONTRIBUTION);
|
|
|
112 |
ecoTotal.setDefaultValue(Boolean.FALSE);
|
|
|
113 |
this.addView(ecoTotal);
|
|
|
114 |
|
|
|
115 |
PrefView<Boolean> barcodeInsert = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Insérer des lignes dans le corps avec la douchette", BARCODE_INSERTION);
|
|
|
116 |
barcodeInsert.setDefaultValue(Boolean.FALSE);
|
|
|
117 |
this.addView(barcodeInsert);
|
|
|
118 |
|
144 |
ilm |
119 |
PrefView<Boolean> createEcrChq = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Créer les écritures comptables à la réception des chèques clients", CREATE_ECR_CHQ);
|
|
|
120 |
createEcrChq.setDefaultValue(Boolean.TRUE);
|
|
|
121 |
this.addView(createEcrChq);
|
|
|
122 |
|
149 |
ilm |
123 |
PrefView<Boolean> createEcrImput = new PrefView<Boolean>(PrefType.BOOLEAN_TYPE, "Imputer les écarts de calcul dans le compte 758", IMPUT_ECART);
|
|
|
124 |
createEcrImput.setDefaultValue(Boolean.TRUE);
|
|
|
125 |
this.addView(createEcrImput);
|
|
|
126 |
|
83 |
ilm |
127 |
ButtonGroup group = new ButtonGroup();
|
|
|
128 |
group.add((JCheckBox) viewMultiTransfert.getVW().getComp());
|
|
|
129 |
group.add((JCheckBox) viewTransfert.getVW().getComp());
|
|
|
130 |
group.add((JCheckBox) viewNo.getVW().getComp());
|
|
|
131 |
|
|
|
132 |
}
|
|
|
133 |
}
|