OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 177 Rev 182
Line 1... Line 1...
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
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
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
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.
9
 * language governing permissions and limitations under the License.
Line 99... Line 99...
99
    public void setPiece(Piece piece) {
99
    public void setPiece(Piece piece) {
100
        this.piece = piece;
100
        this.piece = piece;
101
 
101
 
102
    }
102
    }
103
 
103
 
-
 
104
    public String asString() {
-
 
105
        StringBuilder s = new StringBuilder();
-
 
106
        BigDecimal d = BigDecimal.ZERO;
-
 
107
        BigDecimal c = BigDecimal.ZERO;
-
 
108
        s.append("Mouvement N°");
-
 
109
        s.append(this.numero);
-
 
110
        s.append("\n");
-
 
111
        for (Ecriture e : this.ecritures) {
-
 
112
 
-
 
113
            s.append("D : " + e.getDebit());
-
 
114
            s.append("\tC : " + e.getCredit());
-
 
115
 
-
 
116
            d = d.add(e.getDebit());
-
 
117
            c = c.add(e.getCredit());
-
 
118
            s.append("\tS : " + (d.subtract(c)) + "\n");
-
 
119
        }
-
 
120
        return s.toString();
-
 
121
    }
-
 
122
 
104
    public boolean isEmpty() {
123
    public boolean isEmpty() {
105
        return this.ecritures.isEmpty();
124
        return this.ecritures.isEmpty();
106
    }
125
    }
107
 
126
 
108
    public MouvementPostInsertionAction getPostInsertionAction() {
127
    public MouvementPostInsertionAction getPostInsertionAction() {