OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 177
Line 70... Line 70...
70
    // Configuration.getInstance().getBase().getTable("PERIODE_VALIDITE");
70
    // Configuration.getInstance().getBase().getTable("PERIODE_VALIDITE");
71
 
71
 
72
    private SQLJavaEditor javaEdit = new SQLJavaEditor(VariablePayeSQLElement.getMapTree());
72
    private SQLJavaEditor javaEdit = new SQLJavaEditor(VariablePayeSQLElement.getMapTree());
73
 
73
 
74
    // liste des variable de paye à calculer
74
    // liste des variable de paye à calculer
75
    private BigDecimal salBrut, salBrutBase, salBrutCotis, salBrutTaxable, cotPat, cotSal, taxCmPat, taxCmSal, netImp, pas, netAPayer, csg, csgSansAbattement, cice, allegmentCotisation, avantage,
75
    private BigDecimal salBrut, salBrutCSG, salBrutCSGReduite, salBrutBase, salBrutCotis, salBrutTaxable, cotPat, cotSal, taxCmPat, taxCmSal, netImp, pas, netAPayer, csg, csgSansAbattement, cice,
76
            reduction;
76
            allegmentCotisation, avantage, reduction;
77
 
77
 
78
    private Map<Integer, String> mapField;
78
    private Map<Integer, String> mapField;
79
 
79
 
80
    private final BigDecimal tauxCSG;
80
    private final BigDecimal tauxCSG;
81
 
81
 
Line 144... Line 144...
144
 
144
 
145
    public BigDecimal getCotSal() {
145
    public BigDecimal getCotSal() {
146
        return cotSal;
146
        return cotSal;
147
    }
147
    }
148
 
148
 
-
 
149
    public BigDecimal getCsgReduite() {
-
 
150
        return this.salBrutCSGReduite.multiply(this.tauxCSG);
-
 
151
    }
-
 
152
 
149
    public BigDecimal getCsgTotal() {
153
    public BigDecimal getCsgTotal() {
150
        return this.salBrut.add(this.csg).multiply(this.tauxCSG).add(this.csgSansAbattement);
154
        return this.salBrutCSG.add(this.csg).multiply(this.tauxCSG).add(this.csgSansAbattement);
151
    }
155
    }
152
 
156
 
153
    public BigDecimal getCsgSansAbattement() {
157
    public BigDecimal getCsgSansAbattement() {
154
        return csgSansAbattement;
158
        return csgSansAbattement;
155
    }
159
    }
156
 
160
 
157
    public BigDecimal getPas() {
161
    public BigDecimal getPas() {
158
        return pas;
162
        return pas;
159
    }
163
    }
160
 
164
 
-
 
165
    public BigDecimal getSalBrutCSG() {
-
 
166
        return salBrutCSG;
-
 
167
    }
-
 
168
 
-
 
169
    public BigDecimal getSalBrutCSGReduite() {
-
 
170
        return salBrutCSGReduite;
-
 
171
    }
-
 
172
 
161
    public BigDecimal getNetAPayerTotal() {
173
    public BigDecimal getNetAPayerTotal() {
162
        return netAPayer.add(this.salBrut);
174
        return netAPayer.add(this.salBrut);
163
    }
175
    }
164
 
176
 
165
    public BigDecimal getNetImpTotal() {
177
    public BigDecimal getNetImpTotal() {
Line 204... Line 216...
204
        this.cice = null;
216
        this.cice = null;
205
        this.allegmentCotisation = BigDecimal.ZERO;
217
        this.allegmentCotisation = BigDecimal.ZERO;
206
        this.reduction = BigDecimal.ZERO;
218
        this.reduction = BigDecimal.ZERO;
207
        this.avantage = BigDecimal.ZERO;
219
        this.avantage = BigDecimal.ZERO;
208
        this.salBrut = BigDecimal.ZERO;
220
        this.salBrut = BigDecimal.ZERO;
-
 
221
        this.salBrutCSG = BigDecimal.ZERO;
-
 
222
        this.salBrutCSGReduite = BigDecimal.ZERO;
209
        this.salBrutCotis = BigDecimal.ZERO;
223
        this.salBrutCotis = BigDecimal.ZERO;
210
        this.salBrutBase = BigDecimal.ZERO;
224
        this.salBrutBase = BigDecimal.ZERO;
211
        this.salBrutTaxable = BigDecimal.ZERO;
225
        this.salBrutTaxable = BigDecimal.ZERO;
212
        this.cotPat = BigDecimal.ZERO;
226
        this.cotPat = BigDecimal.ZERO;
213
        this.cotSal = BigDecimal.ZERO;
227
        this.cotSal = BigDecimal.ZERO;
Line 770... Line 784...
770
            rowValsFiche.put("COT_SAL", this.cotSal);
784
            rowValsFiche.put("COT_SAL", this.cotSal);
771
            rowValsFiche.put("COT_PAT", this.cotPat);
785
            rowValsFiche.put("COT_PAT", this.cotPat);
772
            rowValsFiche.put("TAXE_CM_PAT", this.taxCmPat);
786
            rowValsFiche.put("TAXE_CM_PAT", this.taxCmPat);
773
            rowValsFiche.put("TAXE_CM_SAL", this.taxCmSal);
787
            rowValsFiche.put("TAXE_CM_SAL", this.taxCmSal);
774
            rowValsFiche.put("CSG", getCsgTotal());
788
            rowValsFiche.put("CSG", getCsgTotal());
-
 
789
            rowValsFiche.put("CSG_REDUITE", getCsgReduite());
-
 
790
            rowValsFiche.put("SAL_BRUT_CSG", getSalBrutCSG());
-
 
791
            rowValsFiche.put("SAL_BRUT_CSG_REDUITE", getSalBrutCSGReduite());
-
 
792
 
775
            rowValsFiche.put("HEURE_TRAV", getHeureTrav());
793
            rowValsFiche.put("HEURE_TRAV", getHeureTrav());
776
            rowValsFiche.put("TOTAL_PAS", getPas());
794
            rowValsFiche.put("TOTAL_PAS", getPas());
777
 
795
 
778
            if (this.cice == null) {
796
            if (this.cice == null) {
779
                if (salBrut.signum() > 0
797
                if (salBrut.signum() > 0
Line 875... Line 893...
875
                        this.salBrutCotis = this.salBrutCotis.subtract(montant);
893
                        this.salBrutCotis = this.salBrutCotis.subtract(montant);
876
                    }
894
                    }
877
                    if (rowSource.getBoolean("PART_BRUT")) {
895
                    if (rowSource.getBoolean("PART_BRUT")) {
878
                        this.salBrutBase = this.salBrutBase.subtract(montant);
896
                        this.salBrutBase = this.salBrutBase.subtract(montant);
879
                    }
897
                    }
-
 
898
 
-
 
899
                    if (rowSource.getBoolean("CSG_NORMAL")) {
-
 
900
                        this.salBrutCSG = this.salBrutCSG.subtract(montant);
-
 
901
                    }
-
 
902
                    if (rowSource.getBoolean("CSG_REDUIT")) {
-
 
903
                        this.salBrutCSGReduite = this.salBrutCSGReduite.subtract(montant);
-
 
904
                    }
880
                } // Gain
905
                } // Gain
881
                else {
906
                else {
882
 
907
 
883
                    rowVals.put("MONTANT_SAL_AJ", montant);
908
                    rowVals.put("MONTANT_SAL_AJ", montant);
884
                    this.salBrut = this.salBrut.add(montant);
909
                    this.salBrut = this.salBrut.add(montant);
Line 892... Line 917...
892
                        this.salBrutBase = this.salBrutBase.add(montant);
917
                        this.salBrutBase = this.salBrutBase.add(montant);
893
                    }
918
                    }
894
                    if (rowSource.getBoolean("AVANTAGE_NATURE")) {
919
                    if (rowSource.getBoolean("AVANTAGE_NATURE")) {
895
                        this.avantage = this.avantage.add(montant);
920
                        this.avantage = this.avantage.add(montant);
896
                    }
921
                    }
-
 
922
                    if (rowSource.getBoolean("CSG_NORMAL")) {
-
 
923
                        this.salBrutCSG = this.salBrutCSG.add(montant);
-
 
924
                    }
-
 
925
                    if (rowSource.getBoolean("CSG_REDUIT")) {
-
 
926
                        this.salBrutCSGReduite = this.salBrutCSGReduite.add(montant);
-
 
927
                    }
897
 
-
 
898
                }
928
                }
899
 
929
 
900
                // Mis a jour du salaire brut
930
                // Mis a jour du salaire brut
901
                // updateValueFiche();
931
                // updateValueFiche();
902
            } else {
932
            } else {
Line 910... Line 940...
910
                        this.salBrutCotis = this.salBrutCotis.subtract(ded);
940
                        this.salBrutCotis = this.salBrutCotis.subtract(ded);
911
                    }
941
                    }
912
                    if (rowSource.getBoolean("PART_BRUT")) {
942
                    if (rowSource.getBoolean("PART_BRUT")) {
913
                        this.salBrutBase = this.salBrutBase.subtract(ded);
943
                        this.salBrutBase = this.salBrutBase.subtract(ded);
914
                    }
944
                    }
-
 
945
                    if (rowSource.getBoolean("CSG_NORMAL")) {
-
 
946
                        this.salBrutCSG = this.salBrutCSG.subtract(ded);
-
 
947
                    }
-
 
948
                    if (rowSource.getBoolean("CSG_REDUIT")) {
-
 
949
                        this.salBrutCSGReduite = this.salBrutCSGReduite.subtract(ded);
-
 
950
                    }
915
                }
951
                }
916
                BigDecimal add = rowVals.getBigDecimal("MONTANT_SAL_AJ");
952
                BigDecimal add = rowVals.getBigDecimal("MONTANT_SAL_AJ");
917
                if (add != null) {
953
                if (add != null) {
918
                    this.salBrut = this.salBrut.add(add);
954
                    this.salBrut = this.salBrut.add(add);
919
                    if (rowSource.getBoolean("AVANTAGE_NATURE")) {
955
                    if (rowSource.getBoolean("AVANTAGE_NATURE")) {
Line 926... Line 962...
926
                        this.salBrutCotis = this.salBrutCotis.add(add);
962
                        this.salBrutCotis = this.salBrutCotis.add(add);
927
                    }
963
                    }
928
                    if (rowSource.getBoolean("PART_BRUT")) {
964
                    if (rowSource.getBoolean("PART_BRUT")) {
929
                        this.salBrutBase = this.salBrutBase.add(add);
965
                        this.salBrutBase = this.salBrutBase.add(add);
930
                    }
966
                    }
-
 
967
                    if (rowSource.getBoolean("CSG_NORMAL")) {
-
 
968
                        this.salBrutCSG = this.salBrutCSG.add(add);
-
 
969
                    }
-
 
970
                    if (rowSource.getBoolean("CSG_REDUIT")) {
-
 
971
                        this.salBrutCSGReduite = this.salBrutCSGReduite.add(add);
-
 
972
                    }
931
                }
973
                }
932
            }
974
            }
933
        }
975
        }
934
    }
976
    }
935
 
977