67 |
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 |
package org.openconcerto.erp.config;
|
|
|
15 |
|
|
|
16 |
import org.openconcerto.erp.action.AboutAction;
|
|
|
17 |
import org.openconcerto.erp.action.AstuceAction;
|
|
|
18 |
import org.openconcerto.erp.action.GestionDroitsAction;
|
83 |
ilm |
19 |
import org.openconcerto.erp.action.ListeBanqueAction;
|
67 |
ilm |
20 |
import org.openconcerto.erp.action.NouvelleSocieteAction;
|
|
|
21 |
import org.openconcerto.erp.action.PreferencesAction;
|
|
|
22 |
import org.openconcerto.erp.action.SauvegardeBaseAction;
|
|
|
23 |
import org.openconcerto.erp.action.TaskAdminAction;
|
|
|
24 |
import org.openconcerto.erp.action.list.ListeDesSocietesCommonsAction;
|
|
|
25 |
import org.openconcerto.erp.action.list.ListeDesUsersCommonAction;
|
|
|
26 |
import org.openconcerto.erp.core.customerrelationship.customer.action.ListeDesClientsAction;
|
|
|
27 |
import org.openconcerto.erp.core.customerrelationship.customer.action.ListeDesContactsAction;
|
93 |
ilm |
28 |
import org.openconcerto.erp.core.customerrelationship.customer.action.ListeDesDepartementsClientsAction;
|
67 |
ilm |
29 |
import org.openconcerto.erp.core.customerrelationship.customer.action.NouvelHistoriqueListeClientAction;
|
|
|
30 |
import org.openconcerto.erp.core.customerrelationship.mail.action.ListeDesCourriersClientsAction;
|
174 |
ilm |
31 |
import org.openconcerto.erp.core.customerrelationship.mail.action.ListeDesModelesEmailAction;
|
67 |
ilm |
32 |
import org.openconcerto.erp.core.finance.accounting.action.BalanceAgeeAction;
|
|
|
33 |
import org.openconcerto.erp.core.finance.accounting.action.CompteResultatBilanAction;
|
|
|
34 |
import org.openconcerto.erp.core.finance.accounting.action.EtatBalanceAction;
|
|
|
35 |
import org.openconcerto.erp.core.finance.accounting.action.EtatChargeAction;
|
|
|
36 |
import org.openconcerto.erp.core.finance.accounting.action.EtatGrandLivreAction;
|
|
|
37 |
import org.openconcerto.erp.core.finance.accounting.action.EtatJournauxAction;
|
|
|
38 |
import org.openconcerto.erp.core.finance.accounting.action.ExportRelationExpertAction;
|
|
|
39 |
import org.openconcerto.erp.core.finance.accounting.action.GenerePointageAction;
|
|
|
40 |
import org.openconcerto.erp.core.finance.accounting.action.GestionPlanComptableEAction;
|
93 |
ilm |
41 |
import org.openconcerto.erp.core.finance.accounting.action.ImportEcritureAction;
|
177 |
ilm |
42 |
import org.openconcerto.erp.core.finance.accounting.action.ImportEcritureFECAction;
|
83 |
ilm |
43 |
import org.openconcerto.erp.core.finance.accounting.action.ImpressionJournauxAnalytiqueAction;
|
67 |
ilm |
44 |
import org.openconcerto.erp.core.finance.accounting.action.ImpressionLivrePayeAction;
|
93 |
ilm |
45 |
import org.openconcerto.erp.core.finance.accounting.action.ImpressionRepartitionAnalytiqueAction;
|
156 |
ilm |
46 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesCategorieComptableAction;
|
142 |
ilm |
47 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesComptesAction;
|
83 |
ilm |
48 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesDevisesAction;
|
67 |
ilm |
49 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesEcrituresAction;
|
83 |
ilm |
50 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesEcrituresAnalytiquesAction;
|
80 |
ilm |
51 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesJournauxAction;
|
94 |
ilm |
52 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesPostesAnalytiquesAction;
|
93 |
ilm |
53 |
import org.openconcerto.erp.core.finance.accounting.action.ListeDesTauxDeChangeAction;
|
67 |
ilm |
54 |
import org.openconcerto.erp.core.finance.accounting.action.ListeEcritureParClasseAction;
|
|
|
55 |
import org.openconcerto.erp.core.finance.accounting.action.NouveauClotureAction;
|
156 |
ilm |
56 |
import org.openconcerto.erp.core.finance.accounting.action.NouveauClotureSansAnouveauxAction;
|
67 |
ilm |
57 |
import org.openconcerto.erp.core.finance.accounting.action.NouveauLettrageAction;
|
|
|
58 |
import org.openconcerto.erp.core.finance.accounting.action.NouveauPointageAction;
|
|
|
59 |
import org.openconcerto.erp.core.finance.accounting.action.NouvelleValidationAction;
|
|
|
60 |
import org.openconcerto.erp.core.finance.accounting.action.ResultatAnalytiqueAction;
|
149 |
ilm |
61 |
import org.openconcerto.erp.core.finance.accounting.ui.SaisieJournalAction;
|
67 |
ilm |
62 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesChequesAEncaisserAction;
|
|
|
63 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesChequesAvoirAction;
|
|
|
64 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesChequesFournisseursAction;
|
156 |
ilm |
65 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesDepostChequesAction;
|
67 |
ilm |
66 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesEncaissementsAction;
|
|
|
67 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesReferencesAction;
|
|
|
68 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesRelancesAction;
|
|
|
69 |
import org.openconcerto.erp.core.finance.payment.action.ListeDesTraitesFournisseursAction;
|
|
|
70 |
import org.openconcerto.erp.core.finance.payment.action.NouveauDecaissementChequeAvoirAction;
|
|
|
71 |
import org.openconcerto.erp.core.finance.payment.action.NouveauListeDesChequesADecaisserAction;
|
|
|
72 |
import org.openconcerto.erp.core.finance.payment.action.NouveauListeDesChequesAEncaisserAction;
|
174 |
ilm |
73 |
import org.openconcerto.erp.core.finance.payment.element.EncaisserMontantSQLElement;
|
142 |
ilm |
74 |
import org.openconcerto.erp.core.finance.tax.action.ReportingEcoContributionPanel;
|
144 |
ilm |
75 |
import org.openconcerto.erp.core.finance.tax.action.ReportingTaxeComplementairePanel;
|
67 |
ilm |
76 |
import org.openconcerto.erp.core.humanresources.ListeDesContactsAdministratif;
|
142 |
ilm |
77 |
import org.openconcerto.erp.core.humanresources.employe.action.ListeDesAyantsDroitsAction;
|
|
|
78 |
import org.openconcerto.erp.core.humanresources.employe.action.ListeDesCaissesCotisationsAction;
|
67 |
ilm |
79 |
import org.openconcerto.erp.core.humanresources.employe.action.ListeDesCommerciauxAction;
|
142 |
ilm |
80 |
import org.openconcerto.erp.core.humanresources.employe.action.ListeDesContratsPrevoyanceAction;
|
67 |
ilm |
81 |
import org.openconcerto.erp.core.humanresources.employe.action.ListeDesSalariesAction;
|
|
|
82 |
import org.openconcerto.erp.core.humanresources.employe.action.ListeDesSecretairesAction;
|
|
|
83 |
import org.openconcerto.erp.core.humanresources.employe.action.N4DSAction;
|
|
|
84 |
import org.openconcerto.erp.core.humanresources.payroll.action.ClotureMensuellePayeAction;
|
|
|
85 |
import org.openconcerto.erp.core.humanresources.payroll.action.EditionFichePayeAction;
|
142 |
ilm |
86 |
import org.openconcerto.erp.core.humanresources.payroll.action.ListeDesInfosSalariePayeAction;
|
67 |
ilm |
87 |
import org.openconcerto.erp.core.humanresources.payroll.action.ListeDesProfilsPayeAction;
|
|
|
88 |
import org.openconcerto.erp.core.humanresources.payroll.action.ListeDesRubriquesDePayeAction;
|
|
|
89 |
import org.openconcerto.erp.core.humanresources.payroll.action.ListeDesVariablesPayes;
|
|
|
90 |
import org.openconcerto.erp.core.humanresources.payroll.action.NouvelAcompteAction;
|
|
|
91 |
import org.openconcerto.erp.core.humanresources.payroll.action.NouvelHistoriqueFichePayeAction;
|
|
|
92 |
import org.openconcerto.erp.core.humanresources.payroll.action.NouvelleSaisieKmAction;
|
|
|
93 |
import org.openconcerto.erp.core.reports.stat.action.EvolutionCAAction;
|
90 |
ilm |
94 |
import org.openconcerto.erp.core.reports.stat.action.EvolutionCACumulAction;
|
|
|
95 |
import org.openconcerto.erp.core.reports.stat.action.EvolutionCmdAction;
|
|
|
96 |
import org.openconcerto.erp.core.reports.stat.action.EvolutionCmdCumulAction;
|
67 |
ilm |
97 |
import org.openconcerto.erp.core.reports.stat.action.EvolutionMargeAction;
|
174 |
ilm |
98 |
import org.openconcerto.erp.core.reports.stat.action.ReportingCommercialAction;
|
90 |
ilm |
99 |
import org.openconcerto.erp.core.reports.stat.action.VenteArticleFamilleGraphAction;
|
67 |
ilm |
100 |
import org.openconcerto.erp.core.reports.stat.action.VenteArticleGraphAction;
|
|
|
101 |
import org.openconcerto.erp.core.reports.stat.action.VenteArticleMargeGraphAction;
|
|
|
102 |
import org.openconcerto.erp.core.sales.credit.action.ListeDesAvoirsClientsAction;
|
|
|
103 |
import org.openconcerto.erp.core.sales.credit.action.NouveauAvoirClientAction;
|
|
|
104 |
import org.openconcerto.erp.core.sales.invoice.action.EtatVenteAction;
|
144 |
ilm |
105 |
import org.openconcerto.erp.core.sales.invoice.action.GenEtatStockAction;
|
67 |
ilm |
106 |
import org.openconcerto.erp.core.sales.invoice.action.GenListeVenteAction;
|
144 |
ilm |
107 |
import org.openconcerto.erp.core.sales.invoice.action.GenReportingVenteAction;
|
174 |
ilm |
108 |
import org.openconcerto.erp.core.sales.invoice.action.ImportReglementSageAction;
|
67 |
ilm |
109 |
import org.openconcerto.erp.core.sales.invoice.action.ListeDebiteursAction;
|
|
|
110 |
import org.openconcerto.erp.core.sales.invoice.action.ListeDesElementsFactureAction;
|
149 |
ilm |
111 |
import org.openconcerto.erp.core.sales.invoice.action.ListeDesFactureItemsAction;
|
67 |
ilm |
112 |
import org.openconcerto.erp.core.sales.invoice.action.ListeDesVentesAction;
|
177 |
ilm |
113 |
import org.openconcerto.erp.core.sales.invoice.action.ListeEcheancePrelevementAction;
|
151 |
ilm |
114 |
import org.openconcerto.erp.core.sales.invoice.action.ListeSDDMessageAction;
|
67 |
ilm |
115 |
import org.openconcerto.erp.core.sales.invoice.action.ListeSaisieVenteFactureAction;
|
|
|
116 |
import org.openconcerto.erp.core.sales.invoice.action.ListesFacturesClientsImpayeesAction;
|
|
|
117 |
import org.openconcerto.erp.core.sales.invoice.action.NouveauSaisieVenteComptoirAction;
|
|
|
118 |
import org.openconcerto.erp.core.sales.invoice.action.NouveauSaisieVenteFactureAction;
|
156 |
ilm |
119 |
import org.openconcerto.erp.core.sales.invoice.report.ReportingClientPanel;
|
67 |
ilm |
120 |
import org.openconcerto.erp.core.sales.order.action.ListeDesCommandesClientAction;
|
151 |
ilm |
121 |
import org.openconcerto.erp.core.sales.order.action.ListeDesCommandesClientItemsAction;
|
142 |
ilm |
122 |
import org.openconcerto.erp.core.sales.order.action.ListeDesElementsACommanderClientAction;
|
144 |
ilm |
123 |
import org.openconcerto.erp.core.sales.order.action.ListeDesFacturationCommandesClientAction;
|
67 |
ilm |
124 |
import org.openconcerto.erp.core.sales.order.action.NouvelleCommandeClientAction;
|
|
|
125 |
import org.openconcerto.erp.core.sales.pos.action.ListeDesCaissesTicketAction;
|
|
|
126 |
import org.openconcerto.erp.core.sales.product.action.FamilleArticleAction;
|
|
|
127 |
import org.openconcerto.erp.core.sales.product.action.ListeDesArticlesAction;
|
142 |
ilm |
128 |
import org.openconcerto.erp.core.sales.product.action.ListeEcoContributionAction;
|
144 |
ilm |
129 |
import org.openconcerto.erp.core.sales.product.action.ListeHistoCodeClientArticleAction;
|
174 |
ilm |
130 |
import org.openconcerto.erp.core.sales.product.action.TransfertStockAction;
|
67 |
ilm |
131 |
import org.openconcerto.erp.core.sales.quote.action.ListeDesDevisAction;
|
156 |
ilm |
132 |
import org.openconcerto.erp.core.sales.quote.action.ListeDesDevisActionTCP;
|
93 |
ilm |
133 |
import org.openconcerto.erp.core.sales.quote.action.ListeDesElementsDevisAction;
|
67 |
ilm |
134 |
import org.openconcerto.erp.core.sales.quote.action.NouveauDevisAction;
|
|
|
135 |
import org.openconcerto.erp.core.sales.shipment.action.ListeDesBonsDeLivraisonAction;
|
142 |
ilm |
136 |
import org.openconcerto.erp.core.sales.shipment.action.ListeDesReliquatsBonsLivraisonsAction;
|
67 |
ilm |
137 |
import org.openconcerto.erp.core.sales.shipment.action.NouveauBonLivraisonAction;
|
|
|
138 |
import org.openconcerto.erp.core.supplychain.credit.action.ListeDesAvoirsFournisseurAction;
|
|
|
139 |
import org.openconcerto.erp.core.supplychain.credit.action.NouvelAvoirFournisseurAction;
|
|
|
140 |
import org.openconcerto.erp.core.supplychain.order.action.ListeDesCommandesAction;
|
144 |
ilm |
141 |
import org.openconcerto.erp.core.supplychain.order.action.ListeDesDemandesAchatsAction;
|
|
|
142 |
import org.openconcerto.erp.core.supplychain.order.action.ListeDesDemandesPrixAction;
|
142 |
ilm |
143 |
import org.openconcerto.erp.core.supplychain.order.action.ListeDesElementsACommanderAction;
|
80 |
ilm |
144 |
import org.openconcerto.erp.core.supplychain.order.action.ListeDesFacturesFournisseurAction;
|
67 |
ilm |
145 |
import org.openconcerto.erp.core.supplychain.order.action.ListeSaisieAchatAction;
|
|
|
146 |
import org.openconcerto.erp.core.supplychain.order.action.NouveauSaisieAchatAction;
|
|
|
147 |
import org.openconcerto.erp.core.supplychain.order.action.NouvelleCommandeAction;
|
156 |
ilm |
148 |
import org.openconcerto.erp.core.supplychain.order.action.NouvelleDemandePrixAction;
|
80 |
ilm |
149 |
import org.openconcerto.erp.core.supplychain.order.action.NouvelleFactureFournisseurAction;
|
83 |
ilm |
150 |
import org.openconcerto.erp.core.supplychain.product.action.ListeDesArticlesFournisseurAction;
|
67 |
ilm |
151 |
import org.openconcerto.erp.core.supplychain.receipt.action.ListeDesBonsReceptionsAction;
|
94 |
ilm |
152 |
import org.openconcerto.erp.core.supplychain.receipt.action.ListeDesReliquatsBonsReceptionsAction;
|
67 |
ilm |
153 |
import org.openconcerto.erp.core.supplychain.receipt.action.NouveauBonReceptionAction;
|
156 |
ilm |
154 |
import org.openconcerto.erp.core.supplychain.stock.action.ListeDesDepotsStocksAction;
|
|
|
155 |
import org.openconcerto.erp.core.supplychain.stock.action.ListeDesEtatsStocksAction;
|
67 |
ilm |
156 |
import org.openconcerto.erp.core.supplychain.stock.action.ListeDesMouvementsStockAction;
|
156 |
ilm |
157 |
import org.openconcerto.erp.core.supplychain.stock.action.ListeDesStocksAction;
|
67 |
ilm |
158 |
import org.openconcerto.erp.core.supplychain.stock.action.NouvelleSaisieMouvementStockAction;
|
|
|
159 |
import org.openconcerto.erp.core.supplychain.supplier.action.ListeDesContactsFournisseursAction;
|
|
|
160 |
import org.openconcerto.erp.core.supplychain.supplier.action.ListeDesFournisseursAction;
|
|
|
161 |
import org.openconcerto.erp.core.supplychain.supplier.action.ListesFacturesFournImpayeesAction;
|
|
|
162 |
import org.openconcerto.erp.core.supplychain.supplier.action.NouvelHistoriqueListeFournAction;
|
|
|
163 |
import org.openconcerto.erp.modules.ModuleFrame;
|
|
|
164 |
import org.openconcerto.erp.preferences.DefaultNXProps;
|
156 |
ilm |
165 |
import org.openconcerto.erp.preferences.GestionArticleGlobalPreferencePanel;
|
93 |
ilm |
166 |
import org.openconcerto.erp.preferences.GestionClientPreferencePanel;
|
67 |
ilm |
167 |
import org.openconcerto.erp.rights.ComptaUserRight;
|
|
|
168 |
import org.openconcerto.erp.rights.NXRights;
|
80 |
ilm |
169 |
import org.openconcerto.erp.utils.correct.CorrectMouvement;
|
|
|
170 |
import org.openconcerto.sql.model.DBRoot;
|
|
|
171 |
import org.openconcerto.sql.model.SQLSelect;
|
93 |
ilm |
172 |
import org.openconcerto.sql.preferences.SQLPreferences;
|
67 |
ilm |
173 |
import org.openconcerto.sql.users.rights.LockAdminUserRight;
|
|
|
174 |
import org.openconcerto.sql.users.rights.UserRights;
|
83 |
ilm |
175 |
import org.openconcerto.sql.users.rights.UserRightsManager;
|
|
|
176 |
import org.openconcerto.sql.utils.BackupPanel;
|
80 |
ilm |
177 |
import org.openconcerto.ui.FrameUtil;
|
142 |
ilm |
178 |
import org.openconcerto.ui.PanelFrame;
|
67 |
ilm |
179 |
import org.openconcerto.ui.group.Group;
|
|
|
180 |
import org.openconcerto.ui.group.LayoutHints;
|
|
|
181 |
|
80 |
ilm |
182 |
import java.awt.Component;
|
67 |
ilm |
183 |
import java.awt.event.ActionEvent;
|
80 |
ilm |
184 |
import java.util.List;
|
67 |
ilm |
185 |
|
|
|
186 |
import javax.swing.AbstractAction;
|
80 |
ilm |
187 |
import javax.swing.JOptionPane;
|
67 |
ilm |
188 |
|
73 |
ilm |
189 |
public class DefaultMenuConfiguration implements MenuConfiguration {
|
144 |
ilm |
190 |
private ComptaPropsConfiguration configuration;
|
|
|
191 |
|
|
|
192 |
public DefaultMenuConfiguration(ComptaPropsConfiguration configuration) {
|
|
|
193 |
this.configuration = configuration;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
public ComptaPropsConfiguration getConfiguration() {
|
|
|
197 |
return configuration;
|
|
|
198 |
}
|
|
|
199 |
|
67 |
ilm |
200 |
public void registerMenuTranslations() {
|
|
|
201 |
|
|
|
202 |
}
|
|
|
203 |
|
73 |
ilm |
204 |
@Override
|
144 |
ilm |
205 |
public MenuAndActions createMenuAndActions() {
|
73 |
ilm |
206 |
final MenuAndActions res = new MenuAndActions();
|
|
|
207 |
this.createMenuGroup(res.getGroup());
|
|
|
208 |
this.registerMenuActions(res);
|
|
|
209 |
return res;
|
|
|
210 |
}
|
|
|
211 |
|
144 |
ilm |
212 |
public void createMenuGroup(Group mGroup) {
|
142 |
ilm |
213 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
67 |
ilm |
214 |
|
|
|
215 |
mGroup.add(createFilesMenuGroup());
|
|
|
216 |
mGroup.add(createCreationMenuGroup());
|
|
|
217 |
mGroup.add(createListMenuGroup());
|
|
|
218 |
if (rights.haveRight(ComptaUserRight.MENU)) {
|
|
|
219 |
mGroup.add(createAccountingMenuGroup());
|
|
|
220 |
mGroup.add(createStatsDocumentsGroup());
|
|
|
221 |
}
|
|
|
222 |
if (rights.haveRight(NXRights.ACCES_MENU_STAT.getCode())) {
|
|
|
223 |
mGroup.add(createStatsMenuGroup());
|
|
|
224 |
}
|
|
|
225 |
mGroup.add(createPaymentMenuGroup());
|
|
|
226 |
if (rights.haveRight(NXRights.LOCK_MENU_PAYE.getCode())) {
|
|
|
227 |
mGroup.add(createPayrollMenuGroup());
|
|
|
228 |
}
|
|
|
229 |
if (rights.haveRight(NXRights.ACCES_MENU_STRUCTURE.getCode())) {
|
|
|
230 |
mGroup.add(createOrganizationMenuGroup());
|
|
|
231 |
}
|
|
|
232 |
mGroup.add(createHelpMenuGroup());
|
|
|
233 |
if (rights.haveRight(NXRights.LOCK_MENU_TEST.getCode())) {
|
|
|
234 |
mGroup.add(createTestMenuGroup());
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
}
|
|
|
238 |
|
90 |
ilm |
239 |
public void registerMenuActions(final MenuAndActions ma) {
|
73 |
ilm |
240 |
registerFilesMenuActions(ma);
|
|
|
241 |
registerCreationMenuActions(ma);
|
|
|
242 |
registerListMenuActions(ma);
|
|
|
243 |
registerAccountingMenuActions(ma);
|
|
|
244 |
registerStatsDocumentsActions(ma);
|
|
|
245 |
registerStatsMenuActions(ma);
|
|
|
246 |
registerPaymentMenuActions(ma);
|
|
|
247 |
registerPayrollMenuActions(ma);
|
|
|
248 |
registerOrganizationMenuActions(ma);
|
|
|
249 |
registerHelpMenuActions(ma);
|
|
|
250 |
registerHelpTestActions(ma);
|
67 |
ilm |
251 |
}
|
|
|
252 |
|
|
|
253 |
/**
|
|
|
254 |
* Groups
|
|
|
255 |
*/
|
144 |
ilm |
256 |
public Group createFilesMenuGroup() {
|
73 |
ilm |
257 |
Group group = new Group(MainFrame.FILE_MENU);
|
83 |
ilm |
258 |
if (UserRightsManager.getCurrentUserRights().haveRight(BackupPanel.RIGHT_CODE))
|
|
|
259 |
group.addItem("backup");
|
67 |
ilm |
260 |
group.addItem("modules");
|
73 |
ilm |
261 |
if (!Gestion.MAC_OS_X) {
|
|
|
262 |
group.addItem("preferences");
|
|
|
263 |
group.addItem("quit");
|
|
|
264 |
}
|
67 |
ilm |
265 |
return group;
|
|
|
266 |
}
|
|
|
267 |
|
144 |
ilm |
268 |
public Group createCreationMenuGroup() {
|
73 |
ilm |
269 |
final Group group = new Group(MainFrame.CREATE_MENU);
|
|
|
270 |
|
67 |
ilm |
271 |
final Boolean bModeVenteComptoir = DefaultNXProps.getInstance().getBooleanValue("ArticleVenteComptoir", true);
|
142 |
ilm |
272 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
67 |
ilm |
273 |
final Group accountingGroup = new Group("accounting");
|
|
|
274 |
if (rights.haveRight(ComptaUserRight.MENU)) {
|
|
|
275 |
accountingGroup.addItem("accounting.entry.create");
|
149 |
ilm |
276 |
accountingGroup.addItem("accounting.entry.ledger.create");
|
67 |
ilm |
277 |
}
|
|
|
278 |
group.add(accountingGroup);
|
|
|
279 |
|
|
|
280 |
final Group customerGroup = new Group("customer", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
281 |
|
73 |
ilm |
282 |
customerGroup.addItem("customer.quote.create");
|
67 |
ilm |
283 |
|
73 |
ilm |
284 |
customerGroup.addItem("customer.delivery.create");
|
|
|
285 |
customerGroup.addItem("customer.order.create");
|
|
|
286 |
if (bModeVenteComptoir && rights.haveRight("VENTE_COMPTOIR")) {
|
|
|
287 |
customerGroup.addItem("pos.sale.create");
|
|
|
288 |
}
|
|
|
289 |
customerGroup.addItem("customer.invoice.create");
|
67 |
ilm |
290 |
|
73 |
ilm |
291 |
customerGroup.addItem("customer.credit.create");
|
|
|
292 |
group.add(customerGroup);
|
|
|
293 |
|
|
|
294 |
final Group supplierGroup = new Group("supplier", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
295 |
group.add(supplierGroup);
|
|
|
296 |
if (rights.haveRight(NXRights.LOCK_MENU_ACHAT.getCode())) {
|
|
|
297 |
supplierGroup.addItem("supplier.order.create");
|
|
|
298 |
supplierGroup.addItem("supplier.receipt.create");
|
|
|
299 |
supplierGroup.addItem("supplier.purchase.create");
|
80 |
ilm |
300 |
supplierGroup.addItem("supplier.invoice.purchase.create");
|
73 |
ilm |
301 |
supplierGroup.addItem("supplier.credit.create");
|
|
|
302 |
group.addItem("stock.io.create");
|
|
|
303 |
}
|
174 |
ilm |
304 |
group.addItem("product.stock.transfert");
|
73 |
ilm |
305 |
|
67 |
ilm |
306 |
return group;
|
|
|
307 |
}
|
|
|
308 |
|
144 |
ilm |
309 |
public Group createHelpMenuGroup() {
|
73 |
ilm |
310 |
final Group group = new Group(MainFrame.HELP_MENU);
|
67 |
ilm |
311 |
group.addItem("information");
|
|
|
312 |
group.addItem("tips");
|
|
|
313 |
return group;
|
|
|
314 |
}
|
|
|
315 |
|
144 |
ilm |
316 |
public Group createOrganizationMenuGroup() {
|
73 |
ilm |
317 |
final Group group = new Group(MainFrame.STRUCTURE_MENU);
|
142 |
ilm |
318 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
67 |
ilm |
319 |
|
|
|
320 |
if (rights.haveRight(ComptaUserRight.MENU)) {
|
|
|
321 |
final Group gAccounting = new Group("menu.organization.accounting", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
322 |
gAccounting.addItem("accounting.chart");
|
142 |
ilm |
323 |
gAccounting.addItem("accounting.list");
|
67 |
ilm |
324 |
gAccounting.addItem("accounting.journal");
|
156 |
ilm |
325 |
gAccounting.addItem("accounting.category.list");
|
80 |
ilm |
326 |
gAccounting.addItem("accounting.checkDB");
|
83 |
ilm |
327 |
gAccounting.addItem("accounting.currency");
|
93 |
ilm |
328 |
gAccounting.addItem("accounting.currency.rates");
|
67 |
ilm |
329 |
group.add(gAccounting);
|
|
|
330 |
}
|
|
|
331 |
|
|
|
332 |
if (rights.haveRight(LockAdminUserRight.LOCK_MENU_ADMIN)) {
|
|
|
333 |
final Group gUser = new Group("menu.organization.user", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
334 |
gUser.addItem("user.list");
|
|
|
335 |
gUser.addItem("user.right.list");
|
|
|
336 |
gUser.addItem("user.task.right");
|
|
|
337 |
group.add(gUser);
|
|
|
338 |
}
|
174 |
ilm |
339 |
group.addItem("email.template.list");
|
142 |
ilm |
340 |
group.addItem("product.ecotax");
|
73 |
ilm |
341 |
group.addItem("office.contact.list");
|
67 |
ilm |
342 |
group.addItem("salesman.list");
|
|
|
343 |
|
|
|
344 |
final Group gPos = new Group("menu.organization.pos", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
345 |
gPos.addItem("pos.list");
|
|
|
346 |
group.add(gPos);
|
|
|
347 |
|
|
|
348 |
|
|
|
349 |
group.addItem("enterprise.list");
|
|
|
350 |
|
83 |
ilm |
351 |
group.addItem("divison.bank.list");
|
67 |
ilm |
352 |
group.addItem("enterprise.create");
|
|
|
353 |
return group;
|
|
|
354 |
}
|
|
|
355 |
|
144 |
ilm |
356 |
public Group createPayrollMenuGroup() {
|
73 |
ilm |
357 |
final Group group = new Group(MainFrame.PAYROLL_MENU);
|
67 |
ilm |
358 |
group.addItem("payroll.list.report.print");
|
|
|
359 |
group.addItem("payroll.profile.list");
|
|
|
360 |
group.addItem("payroll.history");
|
142 |
ilm |
361 |
group.addItem("payroll.infos.history");
|
67 |
ilm |
362 |
group.addItem("payroll.create");
|
|
|
363 |
group.addItem("payroll.deposit.create");
|
|
|
364 |
group.addItem("employee.list");
|
|
|
365 |
final Group groupConfig = new Group("menu.payroll.config", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
366 |
groupConfig.addItem("payroll.section");
|
|
|
367 |
groupConfig.addItem("payroll.variable");
|
142 |
ilm |
368 |
groupConfig.addItem("payroll.caisse");
|
|
|
369 |
groupConfig.addItem("employee.contrat.prev.list");
|
|
|
370 |
// groupConfig.addItem("employee.contrat.prev.ayantdroit.list");
|
67 |
ilm |
371 |
group.add(groupConfig);
|
|
|
372 |
group.addItem("payroll.closing");
|
|
|
373 |
return group;
|
|
|
374 |
}
|
|
|
375 |
|
90 |
ilm |
376 |
public Group createPaymentMenuGroup() {
|
73 |
ilm |
377 |
final Group group = new Group(MainFrame.PAYMENT_MENU);
|
142 |
ilm |
378 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
67 |
ilm |
379 |
|
|
|
380 |
if (rights.haveRight(ComptaUserRight.MENU) || rights.haveRight(ComptaUserRight.POINTAGE_LETTRAGE)) {
|
|
|
381 |
group.addItem("payment.checking.create");
|
|
|
382 |
group.addItem("payment.reconciliation.create");
|
|
|
383 |
}
|
|
|
384 |
|
|
|
385 |
if (rights.haveRight(NXRights.GESTION_ENCAISSEMENT.getCode())) {
|
|
|
386 |
Group gCustomer = new Group("menu.payment.customer");
|
|
|
387 |
gCustomer.addItem("customer.invoice.unpaid.list");
|
177 |
ilm |
388 |
gCustomer.addItem("customer.payment.prelevement.list");
|
156 |
ilm |
389 |
gCustomer.addItem("customer.payment.report");
|
67 |
ilm |
390 |
gCustomer.addItem("customer.dept.list");
|
|
|
391 |
gCustomer.addItem("customer.payment.list");
|
|
|
392 |
gCustomer.addItem("customer.payment.followup.list");
|
|
|
393 |
gCustomer.addItem("customer.payment.check.pending.list");
|
156 |
ilm |
394 |
gCustomer.addItem("customer.payment.check.deposit.list");
|
67 |
ilm |
395 |
gCustomer.addItem("customer.payment.check.pending.create");
|
156 |
ilm |
396 |
gCustomer.addItem("customer.payment.check.deposit.list");
|
67 |
ilm |
397 |
gCustomer.addItem("customer.credit.check.list");
|
|
|
398 |
gCustomer.addItem("customer.credit.check.create");
|
|
|
399 |
group.add(gCustomer);
|
|
|
400 |
}
|
|
|
401 |
if (rights.haveRight(NXRights.LOCK_MENU_ACHAT.getCode())) {
|
|
|
402 |
Group gSupplier = new Group("menu.payment.supplier");
|
|
|
403 |
gSupplier.addItem("supplier.invoice.unpaid.list");
|
|
|
404 |
gSupplier.addItem("supplier.bill.list");
|
|
|
405 |
gSupplier.addItem("supplier.payment.check.list");
|
|
|
406 |
gSupplier.addItem("supplier.payment.check.pending.list");
|
|
|
407 |
group.add(gSupplier);
|
|
|
408 |
}
|
|
|
409 |
return group;
|
|
|
410 |
}
|
|
|
411 |
|
90 |
ilm |
412 |
public Group createStatsMenuGroup() {
|
73 |
ilm |
413 |
final Group group = new Group(MainFrame.STATS_MENU);
|
67 |
ilm |
414 |
|
|
|
415 |
group.addItem("sales.graph");
|
90 |
ilm |
416 |
group.addItem("sales.graph.cumulate");
|
|
|
417 |
group.addItem("sales.graph.cmd");
|
|
|
418 |
group.addItem("sales.graph.cmd.cumulate");
|
67 |
ilm |
419 |
|
|
|
420 |
group.addItem("sales.margin.graph");
|
144 |
ilm |
421 |
group.addItem("sales.list.stock.report");
|
|
|
422 |
group.addItem("sales.list.reporting");
|
|
|
423 |
group.addItem("order.list.reporting");
|
67 |
ilm |
424 |
group.addItem("sales.list.report");
|
174 |
ilm |
425 |
group.addItem("sales.list.salesman.report");
|
67 |
ilm |
426 |
group.addItem("sales.product.graph");
|
|
|
427 |
group.addItem("sales.product.margin.graph");
|
90 |
ilm |
428 |
group.addItem("sales.product.family.graph");
|
67 |
ilm |
429 |
group.addItem("sales.list.graph");
|
142 |
ilm |
430 |
group.addItem("sales.report.ecocontribution");
|
144 |
ilm |
431 |
group.addItem("sales.report.taxesupp");
|
|
|
432 |
|
67 |
ilm |
433 |
return group;
|
|
|
434 |
}
|
|
|
435 |
|
90 |
ilm |
436 |
public Group createStatsDocumentsGroup() {
|
73 |
ilm |
437 |
final Group group = new Group(MainFrame.DECLARATION_MENU);
|
80 |
ilm |
438 |
// group.addItem("accounting.vat.report");
|
67 |
ilm |
439 |
group.addItem("accounting.costs.report");
|
|
|
440 |
group.addItem("accounting.balance.report");
|
94 |
ilm |
441 |
// group.addItem("accounting.2050Report");
|
67 |
ilm |
442 |
group.addItem("employe.social.report");
|
|
|
443 |
return group;
|
|
|
444 |
}
|
|
|
445 |
|
90 |
ilm |
446 |
public Group createAccountingMenuGroup() {
|
73 |
ilm |
447 |
final Group group = new Group(MainFrame.STATE_MENU);
|
67 |
ilm |
448 |
group.addItem("accounting.balance");
|
|
|
449 |
group.addItem("accounting.client.balance");
|
|
|
450 |
group.addItem("accounting.ledger");
|
83 |
ilm |
451 |
Group analytic = new Group("accounting.analytical");
|
|
|
452 |
analytic.addItem("accounting.analytical.ledger");
|
|
|
453 |
analytic.addItem("accounting.analytical.entries.ledger");
|
93 |
ilm |
454 |
analytic.addItem("accounting.analytical.ledger.global");
|
94 |
ilm |
455 |
analytic.addItem("accounting.analytical.dpt");
|
83 |
ilm |
456 |
group.add(analytic);
|
67 |
ilm |
457 |
group.addItem("accounting.general.ledger");
|
|
|
458 |
group.addItem("accounting.entries.ledger");
|
|
|
459 |
group.addItem("accounting.entries.list");
|
93 |
ilm |
460 |
|
|
|
461 |
final Group gIO = new Group("menu.accounting.io", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
462 |
gIO.addItem("accounting.import");
|
177 |
ilm |
463 |
gIO.addItem("accounting.import.fec");
|
93 |
ilm |
464 |
gIO.addItem("accounting.export");
|
|
|
465 |
group.add(gIO);
|
|
|
466 |
|
67 |
ilm |
467 |
final Group gClosing = new Group("menu.accounting.closing", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
468 |
gClosing.addItem("accounting.validating");
|
|
|
469 |
gClosing.addItem("accounting.closing");
|
|
|
470 |
group.add(gClosing);
|
|
|
471 |
return group;
|
|
|
472 |
}
|
|
|
473 |
|
144 |
ilm |
474 |
public Group createListMenuGroup() {
|
73 |
ilm |
475 |
final Group group = new Group(MainFrame.LIST_MENU);
|
67 |
ilm |
476 |
|
|
|
477 |
final Boolean bModeVenteComptoir = DefaultNXProps.getInstance().getBooleanValue("ArticleVenteComptoir", true);
|
142 |
ilm |
478 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
67 |
ilm |
479 |
|
|
|
480 |
Group gCustomer = new Group("menu.list.customer", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
481 |
gCustomer.addItem("customer.list");
|
93 |
ilm |
482 |
|
|
|
483 |
SQLPreferences prefs = SQLPreferences.getMemCached(configuration.getRootSociete());
|
|
|
484 |
if (prefs.getBoolean(GestionClientPreferencePanel.DISPLAY_CLIENT_DPT, false)) {
|
|
|
485 |
gCustomer.addItem("customer.department.list");
|
|
|
486 |
}
|
|
|
487 |
|
67 |
ilm |
488 |
gCustomer.addItem("contact.list");
|
|
|
489 |
|
|
|
490 |
if (rights.haveRight(NXRights.ACCES_HISTORIQUE.getCode())) {
|
|
|
491 |
gCustomer.addItem("customer.history");
|
|
|
492 |
}
|
|
|
493 |
|
|
|
494 |
|
|
|
495 |
gCustomer.addItem("customer.quote.list");
|
|
|
496 |
|
|
|
497 |
|
|
|
498 |
gCustomer.addItem("customer.order.list");
|
144 |
ilm |
499 |
gCustomer.addItem("customer.order.invoice.list");
|
151 |
ilm |
500 |
gCustomer.addItem("customer.order.list.details");
|
67 |
ilm |
501 |
gCustomer.addItem("customer.delivery.list");
|
142 |
ilm |
502 |
if (configuration.getRootSociete().contains("RELIQUAT_BR")) {
|
|
|
503 |
gCustomer.addItem("customer.delivery.reliquat.list");
|
|
|
504 |
}
|
67 |
ilm |
505 |
group.add(gCustomer);
|
|
|
506 |
|
|
|
507 |
boolean useListDesVentesAction = bModeVenteComptoir;
|
|
|
508 |
if (useListDesVentesAction) {
|
|
|
509 |
gCustomer.addItem("sales.list");
|
|
|
510 |
|
|
|
511 |
} else {
|
|
|
512 |
|
|
|
513 |
gCustomer.addItem("customer.invoice.list");
|
|
|
514 |
}
|
|
|
515 |
|
|
|
516 |
gCustomer.addItem("customer.credit.list");
|
149 |
ilm |
517 |
gCustomer.addItem("customer.invoice.details.list");
|
67 |
ilm |
518 |
|
|
|
519 |
final Group gSupplier = new Group("menu.list.supplier", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
520 |
gSupplier.addItem("supplier.list");
|
|
|
521 |
gSupplier.addItem("supplier.contact.list");
|
|
|
522 |
gSupplier.addItem("supplier.history");
|
|
|
523 |
if (rights.haveRight(NXRights.LOCK_MENU_ACHAT.getCode())) {
|
144 |
ilm |
524 |
gSupplier.addItem("supplier.order.preview");
|
|
|
525 |
gSupplier.addItem("supplier.order.ask");
|
67 |
ilm |
526 |
gSupplier.addItem("supplier.order.list");
|
|
|
527 |
gSupplier.addItem("supplier.receipt.list");
|
94 |
ilm |
528 |
if (configuration.getRootSociete().contains("RELIQUAT_BR")) {
|
|
|
529 |
gSupplier.addItem("supplier.receipt.reliquat.list");
|
|
|
530 |
}
|
67 |
ilm |
531 |
gSupplier.addItem("supplier.purchase.list");
|
80 |
ilm |
532 |
gSupplier.addItem("supplier.invoice.purchase.list");
|
67 |
ilm |
533 |
gSupplier.addItem("supplier.credit.list");
|
|
|
534 |
}
|
|
|
535 |
group.add(gSupplier);
|
|
|
536 |
|
|
|
537 |
final Group gProduct = new Group("menu.list.product", LayoutHints.DEFAULT_NOLABEL_SEPARATED_GROUP_HINTS);
|
|
|
538 |
gProduct.addItem("product.list");
|
144 |
ilm |
539 |
// gProduct.addItem("product.customer.list");
|
83 |
ilm |
540 |
// gProduct.addItem("product.supplychain.list");
|
156 |
ilm |
541 |
if (prefs.getBoolean(GestionArticleGlobalPreferencePanel.STOCK_MULTI_DEPOT, false)) {
|
|
|
542 |
gProduct.addItem("stock.depot.list");
|
|
|
543 |
gProduct.addItem("stock.item.list");
|
|
|
544 |
}
|
67 |
ilm |
545 |
gProduct.addItem("stock.io.list");
|
156 |
ilm |
546 |
gProduct.addItem("stock.io.state");
|
142 |
ilm |
547 |
gProduct.addItem("customer.order.waiting");
|
|
|
548 |
gProduct.addItem("supplier.order.waiting");
|
67 |
ilm |
549 |
group.add(gProduct);
|
|
|
550 |
|
|
|
551 |
return group;
|
|
|
552 |
}
|
|
|
553 |
|
144 |
ilm |
554 |
public Group createTestMenuGroup() {
|
67 |
ilm |
555 |
final Group group = new Group("menu.test");
|
93 |
ilm |
556 |
group.addItem("test.lettrage.fact");
|
|
|
557 |
group.addItem("test.lettrage.compt");
|
|
|
558 |
group.addItem("test.lettrage.achat");
|
94 |
ilm |
559 |
// group.addItem("test.export.ecrp");
|
93 |
ilm |
560 |
|
67 |
ilm |
561 |
return group;
|
|
|
562 |
}
|
|
|
563 |
|
|
|
564 |
/**
|
|
|
565 |
* Actions
|
94 |
ilm |
566 |
*/
|
144 |
ilm |
567 |
public void registerFilesMenuActions(final MenuAndActions mManager) {
|
142 |
ilm |
568 |
mManager.putAction(new SauvegardeBaseAction(), "backup");
|
|
|
569 |
mManager.putAction(new AbstractAction() {
|
156 |
ilm |
570 |
|
|
|
571 |
private ModuleFrame frame = null;
|
|
|
572 |
|
67 |
ilm |
573 |
@Override
|
|
|
574 |
public void actionPerformed(ActionEvent e) {
|
156 |
ilm |
575 |
if (this.frame == null) {
|
|
|
576 |
this.frame = new ModuleFrame(getConfiguration().getModuleManager());
|
|
|
577 |
}
|
|
|
578 |
this.frame.setLocationRelativeTo(null);
|
|
|
579 |
FrameUtil.show(this.frame);
|
67 |
ilm |
580 |
}
|
142 |
ilm |
581 |
}, "modules");
|
156 |
ilm |
582 |
mManager.putAction(new PreferencesAction(getConfiguration().getModuleManager()), "preferences");
|
|
|
583 |
mManager.putAction(new AbstractAction() {
|
|
|
584 |
@Override
|
|
|
585 |
public void actionPerformed(ActionEvent e) {
|
|
|
586 |
MainFrame.getInstance().quit();
|
|
|
587 |
}
|
|
|
588 |
}, "quit");
|
67 |
ilm |
589 |
}
|
|
|
590 |
|
144 |
ilm |
591 |
public void registerCreationMenuActions(final MenuAndActions mManager) {
|
67 |
ilm |
592 |
final Boolean bModeVenteComptoir = DefaultNXProps.getInstance().getBooleanValue("ArticleVenteComptoir", true);
|
142 |
ilm |
593 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
156 |
ilm |
594 |
final ComptaPropsConfiguration conf = this.getConfiguration();
|
67 |
ilm |
595 |
|
|
|
596 |
if (rights.haveRight(ComptaUserRight.MENU)) {
|
156 |
ilm |
597 |
mManager.putAction(new NouvelleSaisieKmAction(conf), "accounting.entry.create");
|
149 |
ilm |
598 |
mManager.putAction(new SaisieJournalAction(), "accounting.entry.ledger.create");
|
67 |
ilm |
599 |
}
|
|
|
600 |
|
73 |
ilm |
601 |
|
156 |
ilm |
602 |
mManager.putAction(new NouveauDevisAction(conf), "customer.quote.create");
|
67 |
ilm |
603 |
|
156 |
ilm |
604 |
mManager.putAction(new NouveauBonLivraisonAction(conf), "customer.delivery.create");
|
|
|
605 |
mManager.putAction(new NouvelleCommandeClientAction(conf), "customer.order.create");
|
67 |
ilm |
606 |
if (bModeVenteComptoir && rights.haveRight("VENTE_COMPTOIR")) {
|
156 |
ilm |
607 |
mManager.putAction(new NouveauSaisieVenteComptoirAction(conf), "pos.sale.create");
|
67 |
ilm |
608 |
}
|
156 |
ilm |
609 |
mManager.putAction(new NouveauSaisieVenteFactureAction(conf), "customer.invoice.create");
|
67 |
ilm |
610 |
|
156 |
ilm |
611 |
mManager.putAction(new NouveauAvoirClientAction(conf), "customer.credit.create");
|
174 |
ilm |
612 |
mManager.putAction(new TransfertStockAction(conf), "product.stock.transfert");
|
67 |
ilm |
613 |
|
|
|
614 |
if (rights.haveRight(NXRights.LOCK_MENU_ACHAT.getCode())) {
|
156 |
ilm |
615 |
mManager.putAction(new NouvelleDemandePrixAction(conf), "supplier.order.ask.create");
|
|
|
616 |
mManager.putAction(new NouvelleCommandeAction(conf), "supplier.order.create");
|
|
|
617 |
mManager.putAction(new NouveauBonReceptionAction(conf), "supplier.receipt.create");
|
|
|
618 |
mManager.putAction(new NouveauSaisieAchatAction(conf), "supplier.purchase.create");
|
|
|
619 |
mManager.putAction(new NouvelleFactureFournisseurAction(conf), "supplier.invoice.purchase.create");
|
|
|
620 |
mManager.putAction(new NouvelAvoirFournisseurAction(conf), "supplier.credit.create");
|
|
|
621 |
mManager.putAction(new NouvelleSaisieMouvementStockAction(conf), "stock.io.create");
|
67 |
ilm |
622 |
}
|
|
|
623 |
|
|
|
624 |
}
|
|
|
625 |
|
144 |
ilm |
626 |
public void registerListMenuActions(final MenuAndActions mManager) {
|
156 |
ilm |
627 |
final ComptaPropsConfiguration conf = this.configuration;
|
67 |
ilm |
628 |
final Boolean bModeVenteComptoir = DefaultNXProps.getInstance().getBooleanValue("ArticleVenteComptoir", true);
|
144 |
ilm |
629 |
|
156 |
ilm |
630 |
// FIXME conf.getCurrentUserRights();
|
142 |
ilm |
631 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
67 |
ilm |
632 |
|
156 |
ilm |
633 |
mManager.putAction(new ListeDesClientsAction(conf), "customer.list");
|
|
|
634 |
SQLPreferences prefs = SQLPreferences.getMemCached(conf.getRootSociete());
|
93 |
ilm |
635 |
if (prefs.getBoolean(GestionClientPreferencePanel.DISPLAY_CLIENT_DPT, false)) {
|
156 |
ilm |
636 |
mManager.putAction(new ListeDesDepartementsClientsAction(conf), "customer.department.list");
|
93 |
ilm |
637 |
}
|
156 |
ilm |
638 |
mManager.putAction(new ListeDesContactsAction(conf), "contact.list");
|
67 |
ilm |
639 |
|
|
|
640 |
if (rights.haveRight(NXRights.ACCES_HISTORIQUE.getCode())) {
|
142 |
ilm |
641 |
mManager.putAction(new NouvelHistoriqueListeClientAction(), "customer.history");
|
67 |
ilm |
642 |
}
|
|
|
643 |
|
|
|
644 |
|
|
|
645 |
|
156 |
ilm |
646 |
mManager.putAction(new ListeDesDevisAction(conf), "customer.quote.list");
|
67 |
ilm |
647 |
|
156 |
ilm |
648 |
|
|
|
649 |
|
142 |
ilm |
650 |
mManager.putAction(new ListeDesCommandesClientAction(), "customer.order.list");
|
156 |
ilm |
651 |
mManager.putAction(new ListeDesFacturationCommandesClientAction(conf), "customer.order.invoice.list");
|
|
|
652 |
mManager.putAction(new ListeDesCommandesClientItemsAction(conf), "customer.order.list.details");
|
|
|
653 |
mManager.putAction(new ListeDesBonsDeLivraisonAction(conf), "customer.delivery.list");
|
|
|
654 |
if (conf.getRootSociete().contains("RELIQUAT_BL")) {
|
|
|
655 |
mManager.putAction(new ListeDesReliquatsBonsLivraisonsAction(), "customer.delivery.reliquat.list");
|
142 |
ilm |
656 |
}
|
67 |
ilm |
657 |
|
|
|
658 |
boolean useListDesVentesAction = bModeVenteComptoir;
|
|
|
659 |
if (useListDesVentesAction) {
|
177 |
ilm |
660 |
mManager.putAction(new ListeDesVentesAction(conf), "sales.list");
|
67 |
ilm |
661 |
|
|
|
662 |
} else {
|
|
|
663 |
|
142 |
ilm |
664 |
mManager.putAction(new ListeSaisieVenteFactureAction(), "customer.invoice.list");
|
67 |
ilm |
665 |
}
|
|
|
666 |
|
156 |
ilm |
667 |
mManager.putAction(new ListeDesAvoirsClientsAction(conf), "customer.credit.list");
|
|
|
668 |
mManager.putAction(new ListeDesFactureItemsAction(conf), "customer.invoice.details.list");
|
67 |
ilm |
669 |
|
142 |
ilm |
670 |
mManager.putAction(new ListeDesFournisseursAction(), "supplier.list");
|
|
|
671 |
mManager.putAction(new ListeDesContactsFournisseursAction(), "supplier.contact.list");
|
|
|
672 |
mManager.putAction(new NouvelHistoriqueListeFournAction(), "supplier.history");
|
67 |
ilm |
673 |
if (rights.haveRight(NXRights.LOCK_MENU_ACHAT.getCode())) {
|
142 |
ilm |
674 |
mManager.putAction(new ListeDesCommandesAction(), "supplier.order.list");
|
156 |
ilm |
675 |
mManager.putAction(new ListeDesDemandesPrixAction(conf), "supplier.order.ask");
|
|
|
676 |
mManager.putAction(new ListeDesDemandesAchatsAction(conf), "supplier.order.preview");
|
142 |
ilm |
677 |
mManager.putAction(new ListeDesReliquatsBonsReceptionsAction(), "supplier.receipt.reliquat.list");
|
156 |
ilm |
678 |
mManager.putAction(new ListeDesBonsReceptionsAction(), "supplier.receipt.list");
|
|
|
679 |
mManager.putAction(new ListeSaisieAchatAction(), "supplier.purchase.list");
|
|
|
680 |
mManager.putAction(new ListeDesFacturesFournisseurAction(), "supplier.invoice.purchase.list");
|
|
|
681 |
mManager.putAction(new ListeDesAvoirsFournisseurAction(), "supplier.credit.list");
|
67 |
ilm |
682 |
}
|
|
|
683 |
|
156 |
ilm |
684 |
mManager.putAction(new ListeDesArticlesAction(), "product.list");
|
|
|
685 |
mManager.putAction(new ListeHistoCodeClientArticleAction(), "product.customer.list");
|
|
|
686 |
mManager.putAction(new ListeDesArticlesFournisseurAction(), "product.supplychain.list");
|
|
|
687 |
mManager.putAction(new ListeDesDepotsStocksAction(), "stock.depot.list");
|
|
|
688 |
mManager.putAction(new ListeDesStocksAction(), "stock.item.list");
|
|
|
689 |
mManager.putAction(new ListeDesMouvementsStockAction(conf), "stock.io.list");
|
|
|
690 |
mManager.putAction(new ListeDesEtatsStocksAction(conf), "stock.io.state");
|
|
|
691 |
mManager.putAction(new ListeDesElementsACommanderClientAction(conf), "customer.order.waiting");
|
|
|
692 |
mManager.putAction(new ListeDesElementsACommanderAction(conf), "supplier.order.waiting");
|
67 |
ilm |
693 |
|
|
|
694 |
|
142 |
ilm |
695 |
|
67 |
ilm |
696 |
}
|
|
|
697 |
|
90 |
ilm |
698 |
public void registerAccountingMenuActions(final MenuAndActions mManager) {
|
156 |
ilm |
699 |
mManager.putAction(new EtatBalanceAction(), "accounting.balance");
|
|
|
700 |
mManager.putAction(new BalanceAgeeAction(), "accounting.client.balance");
|
|
|
701 |
mManager.putAction(new ImpressionJournauxAnalytiqueAction(), "accounting.analytical.ledger");
|
|
|
702 |
mManager.putAction(new EtatJournauxAction(), "accounting.ledger");
|
|
|
703 |
mManager.putAction(new EtatGrandLivreAction(), "accounting.general.ledger");
|
|
|
704 |
mManager.putAction(new ListeDesEcrituresAction(), "accounting.entries.ledger");
|
|
|
705 |
mManager.putAction(new ListeDesEcrituresAnalytiquesAction(), "accounting.analytical.entries.ledger");
|
|
|
706 |
mManager.putAction(new ListeDesPostesAnalytiquesAction(), "accounting.analytical.dpt");
|
|
|
707 |
mManager.putAction(new ImpressionRepartitionAnalytiqueAction(), "accounting.analytical.ledger.global");
|
|
|
708 |
mManager.putAction(new ListeEcritureParClasseAction(), "accounting.entries.list");
|
|
|
709 |
mManager.putAction(new NouvelleValidationAction(), "accounting.validating");
|
|
|
710 |
mManager.putAction(new NouveauClotureAction(), "accounting.closing");
|
|
|
711 |
mManager.putAction(new ImportEcritureAction(), "accounting.import");
|
|
|
712 |
mManager.putAction(new ExportRelationExpertAction(), "accounting.export");
|
177 |
ilm |
713 |
mManager.putAction(new ImportEcritureFECAction(), "accounting.import.fec");
|
67 |
ilm |
714 |
}
|
|
|
715 |
|
90 |
ilm |
716 |
public void registerStatsDocumentsActions(final MenuAndActions mManager) {
|
156 |
ilm |
717 |
// mManager.putAction("accounting.vat.report", new DeclarationTVAAction());
|
|
|
718 |
mManager.putAction(new EtatChargeAction(), "accounting.costs.report");
|
|
|
719 |
mManager.putAction(new CompteResultatBilanAction(), "accounting.balance.report");
|
|
|
720 |
mManager.putAction(new N4DSAction(), "employe.social.report");
|
|
|
721 |
// mManager.putAction("accounting.2050Report", new CompteResultatBilan2050Action());
|
67 |
ilm |
722 |
}
|
|
|
723 |
|
90 |
ilm |
724 |
public void registerStatsMenuActions(final MenuAndActions mManager) {
|
174 |
ilm |
725 |
final ComptaPropsConfiguration conf = getConfiguration();
|
67 |
ilm |
726 |
|
156 |
ilm |
727 |
mManager.putAction(new EvolutionCAAction(), "sales.graph");
|
|
|
728 |
mManager.putAction(new EvolutionCACumulAction(), "sales.graph.cumulate");
|
67 |
ilm |
729 |
|
156 |
ilm |
730 |
mManager.putAction(new EvolutionCmdAction(), "sales.graph.cmd");
|
|
|
731 |
mManager.putAction(new EvolutionCmdCumulAction(), "sales.graph.cmd.cumulate");
|
90 |
ilm |
732 |
|
174 |
ilm |
733 |
mManager.putAction(new ReportingCommercialAction(conf.getRootSociete()), "sales.list.salesman.report");
|
|
|
734 |
|
156 |
ilm |
735 |
mManager.putAction(new EvolutionMargeAction(), "sales.margin.graph");
|
|
|
736 |
mManager.putAction(new GenReportingVenteAction(false), "sales.list.reporting");
|
|
|
737 |
mManager.putAction(new GenReportingVenteAction(true), "order.list.reporting");
|
|
|
738 |
// mManager.putAction("sales.list.reporting", new GenReportingVenteAction());
|
|
|
739 |
mManager.putAction(new GenListeVenteAction(), "sales.list.report");
|
|
|
740 |
mManager.putAction(new GenEtatStockAction(), "sales.list.stock.report");
|
67 |
ilm |
741 |
|
156 |
ilm |
742 |
mManager.putAction(new VenteArticleGraphAction(), "sales.product.graph");
|
|
|
743 |
mManager.putAction(new VenteArticleMargeGraphAction(), "sales.product.margin.graph");
|
|
|
744 |
mManager.putAction(new VenteArticleFamilleGraphAction(), "sales.product.family.graph");
|
|
|
745 |
mManager.putAction(new EtatVenteAction(), "sales.list.graph");
|
67 |
ilm |
746 |
|
156 |
ilm |
747 |
mManager.putAction(new AbstractAction("Reporting Eco Contribution") {
|
142 |
ilm |
748 |
|
|
|
749 |
@Override
|
|
|
750 |
public void actionPerformed(ActionEvent e) {
|
|
|
751 |
|
|
|
752 |
PanelFrame frame = new PanelFrame(new ReportingEcoContributionPanel(), "Reporting Eco Contribution");
|
|
|
753 |
frame.setVisible(true);
|
|
|
754 |
}
|
156 |
ilm |
755 |
}, "sales.report.ecocontribution");
|
142 |
ilm |
756 |
|
156 |
ilm |
757 |
mManager.putAction(new AbstractAction("Reporting Taxes complémentaires") {
|
144 |
ilm |
758 |
|
|
|
759 |
@Override
|
|
|
760 |
public void actionPerformed(ActionEvent e) {
|
|
|
761 |
|
|
|
762 |
PanelFrame frame = new PanelFrame(new ReportingTaxeComplementairePanel(), "Reporting Taxes complémentaires");
|
|
|
763 |
frame.setVisible(true);
|
|
|
764 |
}
|
156 |
ilm |
765 |
}, "sales.report.taxesupp");
|
144 |
ilm |
766 |
|
67 |
ilm |
767 |
}
|
|
|
768 |
|
90 |
ilm |
769 |
public void registerPaymentMenuActions(final MenuAndActions mManager) {
|
142 |
ilm |
770 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
156 |
ilm |
771 |
final ComptaPropsConfiguration conf = getConfiguration();
|
67 |
ilm |
772 |
|
|
|
773 |
if (rights.haveRight(ComptaUserRight.MENU) || rights.haveRight(ComptaUserRight.POINTAGE_LETTRAGE)) {
|
142 |
ilm |
774 |
mManager.putAction(new NouveauPointageAction(), "payment.checking.create");
|
|
|
775 |
mManager.putAction(new NouveauLettrageAction(), "payment.reconciliation.create");
|
67 |
ilm |
776 |
}
|
|
|
777 |
|
|
|
778 |
if (rights.haveRight(NXRights.GESTION_ENCAISSEMENT.getCode())) {
|
142 |
ilm |
779 |
mManager.putAction(new ListesFacturesClientsImpayeesAction(), "customer.invoice.unpaid.list");
|
174 |
ilm |
780 |
mManager.putAction(new ImportReglementSageAction(conf.getDirectory().getElement(EncaisserMontantSQLElement.class)), "customer.invoice.payment.xml.sage.import");
|
142 |
ilm |
781 |
mManager.putAction(new ListeDebiteursAction(), "customer.dept.list");
|
156 |
ilm |
782 |
mManager.putAction(new AbstractAction("Relevé client") {
|
|
|
783 |
@Override
|
|
|
784 |
public void actionPerformed(ActionEvent arg0) {
|
|
|
785 |
|
|
|
786 |
PanelFrame frame = new PanelFrame(new ReportingClientPanel(), "Reporting client");
|
|
|
787 |
frame.setVisible(true);
|
|
|
788 |
|
|
|
789 |
}
|
|
|
790 |
}, "customer.payment.report");
|
142 |
ilm |
791 |
mManager.putAction(new ListeDesEncaissementsAction(), "customer.payment.list");
|
|
|
792 |
mManager.putAction(new ListeDesRelancesAction(), "customer.payment.followup.list");
|
|
|
793 |
mManager.putAction(new ListeDesChequesAEncaisserAction(), "customer.payment.check.pending.list");
|
156 |
ilm |
794 |
mManager.putAction(new ListeDesDepostChequesAction(), "customer.payment.check.deposit.list");
|
|
|
795 |
mManager.putAction(new NouveauListeDesChequesAEncaisserAction(conf), "customer.payment.check.pending.create");
|
|
|
796 |
mManager.putAction(new ListeSDDMessageAction(conf.getDirectory()), "customer.payment.sddMessage.list");
|
177 |
ilm |
797 |
mManager.putAction(new ListeEcheancePrelevementAction(conf), "customer.payment.prelevement.list");
|
142 |
ilm |
798 |
mManager.putAction(new ListeDesChequesAvoirAction(), "customer.credit.check.list");
|
156 |
ilm |
799 |
mManager.putAction(new NouveauDecaissementChequeAvoirAction(conf), "customer.credit.check.create");
|
177 |
ilm |
800 |
|
67 |
ilm |
801 |
}
|
|
|
802 |
if (rights.haveRight(NXRights.LOCK_MENU_ACHAT.getCode())) {
|
142 |
ilm |
803 |
mManager.putAction(new ListesFacturesFournImpayeesAction(), "supplier.invoice.unpaid.list");
|
|
|
804 |
mManager.putAction(new ListeDesTraitesFournisseursAction(), "supplier.bill.list");
|
|
|
805 |
mManager.putAction(new ListeDesChequesFournisseursAction(), "supplier.payment.check.list");
|
156 |
ilm |
806 |
mManager.putAction(new NouveauListeDesChequesADecaisserAction(conf), "supplier.payment.check.pending.list");
|
67 |
ilm |
807 |
}
|
|
|
808 |
|
|
|
809 |
}
|
|
|
810 |
|
144 |
ilm |
811 |
public void registerPayrollMenuActions(final MenuAndActions mManager) {
|
156 |
ilm |
812 |
final ComptaPropsConfiguration conf = getConfiguration();
|
142 |
ilm |
813 |
mManager.putAction(new ImpressionLivrePayeAction(), "payroll.list.report.print");
|
|
|
814 |
mManager.putAction(new ListeDesProfilsPayeAction(), "payroll.profile.list");
|
|
|
815 |
mManager.putAction(new NouvelHistoriqueFichePayeAction(), "payroll.history");
|
|
|
816 |
mManager.putAction(new EditionFichePayeAction(), "payroll.create");
|
156 |
ilm |
817 |
mManager.putAction(new NouvelAcompteAction(conf), "payroll.deposit.create");
|
142 |
ilm |
818 |
mManager.putAction(new ListeDesSalariesAction(), "employee.list");
|
|
|
819 |
mManager.putAction(new ListeDesContratsPrevoyanceAction(), "employee.contrat.prev.list");
|
|
|
820 |
mManager.putAction(new ListeDesCaissesCotisationsAction(), "payroll.caisse");
|
|
|
821 |
mManager.putAction(new ListeDesAyantsDroitsAction(), "employee.contrat.prev.ayantdroit.list");
|
67 |
ilm |
822 |
|
142 |
ilm |
823 |
mManager.putAction(new ListeDesRubriquesDePayeAction(), "payroll.section");
|
|
|
824 |
mManager.putAction(new ListeDesVariablesPayes(), "payroll.variable");
|
|
|
825 |
mManager.putAction(new ListeDesInfosSalariePayeAction(), "payroll.infos.history");
|
|
|
826 |
mManager.putAction(new ClotureMensuellePayeAction(), "payroll.closing");
|
|
|
827 |
|
67 |
ilm |
828 |
}
|
|
|
829 |
|
90 |
ilm |
830 |
public void registerOrganizationMenuActions(final MenuAndActions mManager) {
|
142 |
ilm |
831 |
final UserRights rights = UserRightsManager.getCurrentUserRights();
|
144 |
ilm |
832 |
|
67 |
ilm |
833 |
if (rights.haveRight(ComptaUserRight.MENU)) {
|
83 |
ilm |
834 |
mManager.putAction(new GestionPlanComptableEAction(), "accounting.chart");
|
142 |
ilm |
835 |
mManager.putAction(new ListeDesComptesAction(), "accounting.list");
|
|
|
836 |
|
83 |
ilm |
837 |
mManager.putAction(new ListeDesJournauxAction(), "accounting.journal");
|
|
|
838 |
mManager.putAction(new ListeDesDevisesAction(), "accounting.currency");
|
156 |
ilm |
839 |
mManager.putAction(new ListeDesCategorieComptableAction(), "accounting.category.list");
|
93 |
ilm |
840 |
mManager.putAction(new ListeDesTauxDeChangeAction(), "accounting.currency.rates");
|
80 |
ilm |
841 |
mManager.putAction(new AbstractAction("Check DB") {
|
|
|
842 |
@Override
|
|
|
843 |
public void actionPerformed(ActionEvent e) {
|
144 |
ilm |
844 |
final DBRoot rootSociete = configuration.getRootSociete();
|
80 |
ilm |
845 |
final SQLSelect sel = CorrectMouvement.createUnbalancedSelect(rootSociete);
|
|
|
846 |
final List<?> ids = rootSociete.getDBSystemRoot().getDataSource().executeCol(sel.asString());
|
142 |
ilm |
847 |
JOptionPane.showMessageDialog((Component) e.getSource(), "Il y a " + ids.size() + " mouvement(s) non équilibré(s).", "Résultat",
|
|
|
848 |
ids.size() == 0 ? JOptionPane.INFORMATION_MESSAGE : JOptionPane.WARNING_MESSAGE);
|
80 |
ilm |
849 |
}
|
|
|
850 |
}, "accounting.checkDB");
|
67 |
ilm |
851 |
}
|
142 |
ilm |
852 |
mManager.putAction(new ListeEcoContributionAction(), "product.ecotax");
|
67 |
ilm |
853 |
|
|
|
854 |
if (rights.haveRight(LockAdminUserRight.LOCK_MENU_ADMIN)) {
|
142 |
ilm |
855 |
mManager.putAction(new ListeDesUsersCommonAction(), "user.list");
|
|
|
856 |
mManager.putAction(new GestionDroitsAction(), "user.right.list");
|
|
|
857 |
mManager.putAction(new TaskAdminAction(), "user.task.right");
|
67 |
ilm |
858 |
}
|
174 |
ilm |
859 |
mManager.putAction(new ListeDesModelesEmailAction(), "email.template.list");
|
142 |
ilm |
860 |
mManager.putAction(new ListeDesContactsAdministratif(), "office.contact.list");
|
|
|
861 |
mManager.putAction(new ListeDesCommerciauxAction(), "salesman.list");
|
|
|
862 |
mManager.putAction(new ListeDesCaissesTicketAction(), "pos.list");
|
67 |
ilm |
863 |
|
|
|
864 |
|
142 |
ilm |
865 |
mManager.putAction(new ListeDesSocietesCommonsAction(), "enterprise.list");
|
67 |
ilm |
866 |
|
142 |
ilm |
867 |
mManager.putAction(new ListeBanqueAction(), "divison.bank.list");
|
156 |
ilm |
868 |
mManager.putAction(new NouvelleSocieteAction(this.getConfiguration()), "enterprise.create");
|
67 |
ilm |
869 |
}
|
|
|
870 |
|
144 |
ilm |
871 |
public void registerHelpMenuActions(final MenuAndActions mManager) {
|
177 |
ilm |
872 |
mManager.putAction(new AboutAction(getConfiguration()), "information");
|
142 |
ilm |
873 |
mManager.putAction(new AstuceAction(), "tips");
|
67 |
ilm |
874 |
}
|
|
|
875 |
|
144 |
ilm |
876 |
public void registerHelpTestActions(final MenuAndActions mManager) {
|
93 |
ilm |
877 |
|
156 |
ilm |
878 |
mManager.putAction(new NouveauClotureSansAnouveauxAction(), "accounting.closing.sansanouveaux");
|
|
|
879 |
// mManager.putAction("test.export.ecrp", new ExportPointageAction());
|
94 |
ilm |
880 |
|
67 |
ilm |
881 |
}
|
|
|
882 |
}
|