144 |
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.core.humanresources.payroll.report;
|
|
|
15 |
|
|
|
16 |
import org.openconcerto.utils.i18n.TranslationManager;
|
|
|
17 |
|
|
|
18 |
import java.util.HashMap;
|
|
|
19 |
import java.util.Map;
|
|
|
20 |
|
|
|
21 |
public enum LignePayeSimplifiee {
|
|
|
22 |
|
|
|
23 |
SANTE_SECURITE("sante.securite"), SANTE_COMPLEMENAIRE_DECES("sante.complementaire.deces"), SANTE_COMPLEMENAIRE_SANTE("sante.complementaire.sante"), ACCIDENTS_TRAVAIL(
|
|
|
24 |
"accident.accident"), RETRAITE_SECURITE_PLAF("retraite.securite.plaf"), RETRAITE_SECURITE_NON_PLAF("retraite.securite.non.plaf"), RETRAITE_COMPLEMENTAIRE_T1(
|
|
|
25 |
"retraite.tranche1"), RETRAITE_COMPLEMENTAIRE_T2("retraite.tranche2"), RETRAITE_COMPLEMENTAIRE_TA("retraite.trancheA"), RETRAITE_COMPLEMENTAIRE_GMP(
|
|
|
26 |
"retraite.GMP"), RETRAITE_COMPLEMENTAIRE_TB("retraite.trancheB"), RETRAITE_COMPLEMENTAIRE_TC("retraite.trancheC"), RETRAITE_SUPPLEMENTAIRE(
|
|
|
27 |
"retraite.supplementaire"), FAMILLE_ALLOCATIONS("famille.famille.allocations"), ASSURANCE_CHOMAGE_CHOMAGE("chomage.chomage"), ASSURANCE_CHOMAGE_APEC(
|
|
|
28 |
"chomage.apec"), COTISATIONS_STATUAIRES("cotisations.statuaires.ligne"), AUTRES_CONTRIBUTIONS("autres.contributions.ligne"), CSG_NON_IMP(
|
|
|
29 |
"csg.nonimp.ligne"), CSG_IMP("csg.imp.ligne"), ALLEGEMENT_COTISATIONS("allegement.cotisations.ligne"), IGNORE("paye.simplifie.ignore");
|
|
|
30 |
|
|
|
31 |
private final String id;
|
|
|
32 |
|
|
|
33 |
private LignePayeSimplifiee(String id) {
|
|
|
34 |
this.id = id;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
public String getId() {
|
|
|
38 |
return id;
|
|
|
39 |
}
|
|
|
40 |
|
|
|
41 |
public String getTranslation() {
|
|
|
42 |
final String translationForItem = TranslationManager.getInstance().getTranslationForItem(getId());
|
|
|
43 |
|
|
|
44 |
return (translationForItem == null || translationForItem.trim().length() == 0) ? getId() : translationForItem;
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
private static final Map<String, LignePayeSimplifiee> idToEnum = new HashMap<String, LignePayeSimplifiee>();
|
|
|
48 |
static {
|
|
|
49 |
for (LignePayeSimplifiee e : values())
|
|
|
50 |
idToEnum.put(e.getId(), e);
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
public static LignePayeSimplifiee fromID(String id) {
|
|
|
54 |
return idToEnum.get(id);
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
@Override
|
|
|
58 |
public String toString() {
|
|
|
59 |
return getTranslation();
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
}
|