OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 177
Line 45... Line 45...
45
        //
45
        //
46
    }
46
    }
47
 
47
 
48
    public void loadFrom(File file) throws IOException {
48
    public void loadFrom(File file) throws IOException {
49
        this.error = null;
49
        this.error = null;
50
        this.mapPiece = null;
50
        this.mapPiece = new HashMap<>();
51
 
51
 
52
        try (BufferedReader bReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), Charset.forName("Cp1252")))) {
52
        try (BufferedReader bReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), Charset.forName("Cp1252")))) {
53
            String line = bReader.readLine();
53
            String line = bReader.readLine();
54
            final List<String> headers = StringUtils.fastSplit(line, ExportFEC.ZONE_SEPARATOR);
54
            final List<String> headers = StringUtils.fastSplit(line, ExportFEC.ZONE_SEPARATOR);
55
            for (int i = 0; i < headers.size(); i++) {
55
            for (int i = 0; i < headers.size(); i++) {
Line 90... Line 90...
90
                Mouvement mouvement;
90
                Mouvement mouvement;
91
                if (p == null) {
91
                if (p == null) {
92
                    p = new Piece(pieceRef);
92
                    p = new Piece(pieceRef);
93
                    mouvement = new Mouvement();
93
                    mouvement = new Mouvement();
94
                    p.add(mouvement);
94
                    p.add(mouvement);
95
 
-
 
-
 
95
                    this.mapPiece.put(pieceRef, p);
96
                } else {
96
                } else {
97
                    mouvement = p.getMouvements().get(0);
97
                    mouvement = p.getMouvements().get(0);
98
                }
98
                }
99
                final Ecriture ecriture = new Ecriture(ecritureDate, debit, credit);
99
                final Ecriture ecriture = new Ecriture(ecritureDate, debit, credit);
100
                ecriture.setNom(ecritureLib);
100
                ecriture.setNom(ecritureLib);