OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 18 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18 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.element.objet;
15
 
177 ilm 16
import java.util.ArrayList;
17
import java.util.List;
18
 
18 ilm 19
public class Compte {
20
    private int id;
21
    private String numero;
22
    private String nom;
23
    private String infos;
24
    private long totalDebit;
25
    private long totalCredit;
26
 
27
    public Compte(final int id, final String numero, final String nom) {
28
        this.id = id;
29
        this.numero = numero;
30
        this.nom = nom;
31
        this.infos = "";
32
        this.totalCredit = 0;
33
        this.totalDebit = 0;
34
    }
35
 
36
    public Compte(final int id, final String numero, final String nom, final String infos) {
37
        this.id = id;
38
        this.numero = numero;
39
        this.nom = nom;
40
        this.infos = infos;
41
        this.totalCredit = 0;
42
        this.totalDebit = 0;
43
    }
44
 
45
    public Compte(final int id, final String numero, final String nom, final String infos, final long totalDebit, final long totalCredit) {
46
        this.id = id;
47
        this.numero = numero;
48
        this.nom = nom;
49
        this.infos = infos;
50
        this.totalCredit = totalCredit;
51
        this.totalDebit = totalDebit;
52
    }
53
 
177 ilm 54
    private List<String> sousCompte = new ArrayList<>();
55
 
56
    public List<String> getSousCompte() {
57
        return this.sousCompte;
58
    }
59
 
60
    public void addSousCompte(String compteNum) {
61
        this.sousCompte.add(compteNum);
62
    }
63
 
64
    public void addSousCompte(List<String> compteNum) {
65
        this.sousCompte.addAll(compteNum);
66
    }
67
 
18 ilm 68
    public int getId() {
69
        return this.id;
70
    }
71
 
72
    public String getNumero() {
73
        return this.numero;
74
    }
75
 
76
    public String getNom() {
77
        return this.nom;
78
    }
79
 
80
    public String getInfos() {
81
        return this.infos;
82
    }
83
 
84
    public long getTotalDebit() {
85
        return this.totalDebit;
86
    }
87
 
88
    public long getTotalCredit() {
89
        return this.totalCredit;
90
    }
91
 
92
    public void setId(final int id) {
93
        this.id = id;
94
    }
95
 
96
    public void setNumero(final String num) {
97
        this.numero = num;
98
    }
99
 
100
    public void setNom(final String nom) {
101
        this.nom = nom;
102
    }
103
 
104
    public void setInfos(final String infos) {
105
        this.infos = infos;
106
    }
107
 
108
    public void setTotalDebit(final long f) {
109
        this.totalDebit = f;
110
    }
111
 
112
    public void setTotalCredit(final long f) {
113
        this.totalCredit = f;
114
    }
115
 
116
    @Override
117
    public String toString() {
118
        return "Compte --> " + this.id + " " + this.numero + " " + this.nom + " infos :" + this.infos;
119
    }
120
}