OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 180 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 Rev 182
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.
10
 * 
10
 * 
11
 * When distributing the software, include this License Header Notice in each file.
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.erp.core.finance.accounting.model;
14
 package org.openconcerto.erp.core.finance.accounting.model;
15
 
15
 
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
17
import org.openconcerto.erp.core.common.ui.DeviseField;
17
import org.openconcerto.erp.core.common.ui.DeviseField;
18
import org.openconcerto.erp.core.finance.accounting.ui.PointagePanel;
18
import org.openconcerto.erp.core.finance.accounting.ui.PointagePanel;
19
import org.openconcerto.sql.Configuration;
19
import org.openconcerto.sql.Configuration;
20
import org.openconcerto.sql.model.SQLBase;
20
import org.openconcerto.sql.model.SQLBase;
21
import org.openconcerto.sql.model.SQLRow;
21
import org.openconcerto.sql.model.SQLRow;
22
import org.openconcerto.sql.model.SQLRowValues;
22
import org.openconcerto.sql.model.SQLRowValues;
23
import org.openconcerto.sql.model.SQLSelect;
23
import org.openconcerto.sql.model.SQLSelect;
24
import org.openconcerto.sql.model.SQLTable;
24
import org.openconcerto.sql.model.SQLTable;
25
import org.openconcerto.sql.model.Where;
25
import org.openconcerto.sql.model.Where;
26
import org.openconcerto.sql.view.list.IListe;
26
import org.openconcerto.sql.view.list.IListe;
27
import org.openconcerto.sql.view.list.ITableModel;
27
import org.openconcerto.sql.view.list.ITableModel;
28
 
28
 
29
import java.util.Date;
29
import java.util.Date;
30
import java.util.List;
30
import java.util.List;
31
 
31
 
32
import javax.swing.SwingWorker;
32
import javax.swing.SwingWorker;
33
import javax.swing.table.AbstractTableModel;
33
import javax.swing.table.AbstractTableModel;
34
 
34
 
35
import org.apache.commons.dbutils.handlers.ArrayListHandler;
35
import org.apache.commons.dbutils.handlers.ArrayListHandler;
36
 
36
 
37
public class PointageModel extends AbstractTableModel {
37
public class PointageModel extends AbstractTableModel {
38
 
38
 
39
    private String[] titresCol;
39
    private String[] titresCol;
40
    private String[] titresRow;
40
    private String[] titresRow;
41
    private PointagePanel panel;
41
    private PointagePanel panel;
42
    private long debitListe, creditListe, debitTotal, creditTotal, debitPointe, creditPointe, debitNonPointe, creditNonPointe, creditSelection, debitSelection;
42
    private long debitListe, creditListe, debitTotal, creditTotal, debitPointe, creditPointe, debitNonPointe, creditNonPointe, creditSelection, debitSelection;
43
 
43
 
44
    private static final SQLBase base = ((ComptaPropsConfiguration) Configuration.getInstance()).getSQLBaseSociete();
44
    private static final SQLBase base = ((ComptaPropsConfiguration) Configuration.getInstance()).getSQLBaseSociete();
45
    private static final SQLTable tableEcr = base.getTable("ECRITURE");
45
    private static final SQLTable tableEcr = base.getTable("ECRITURE");
46
    int idCpt;
46
    int idCpt;
47
 
47
 
48
    public PointageModel(int idCpt, PointagePanel panel) {
48
    public PointageModel(int idCpt, PointagePanel panel) {
49
        this.creditNonPointe = 0;
49
        this.creditNonPointe = 0;
50
        this.creditTotal = 0;
50
        this.creditTotal = 0;
51
        this.creditPointe = 0;
51
        this.creditPointe = 0;
52
        this.creditSelection = 0;
52
        this.creditSelection = 0;
53
 
53
 
54
        this.panel = panel;
54
        this.panel = panel;
55
 
55
 
56
        this.debitNonPointe = 0;
56
        this.debitNonPointe = 0;
57
        this.debitPointe = 0;
57
        this.debitPointe = 0;
58
        this.debitTotal = 0;
58
        this.debitTotal = 0;
59
        this.debitSelection = 0;
59
        this.debitSelection = 0;
60
 
60
 
61
        this.idCpt = idCpt;
61
        this.idCpt = idCpt;
62
        this.titresCol = new String[6];
62
        this.titresCol = new String[6];
63
        this.titresCol[0] = "Totaux période";
63
        this.titresCol[0] = "Totaux période";
64
        this.titresCol[1] = "Pointé";
64
        this.titresCol[1] = "Pointé";
65
        this.titresCol[2] = "Relevé courant";
65
        this.titresCol[2] = "Relevé courant";
66
        this.titresCol[3] = "Total";
66
        this.titresCol[3] = "Total";
67
 
67
 
68
        this.titresCol[4] = "Sélection";
68
        this.titresCol[4] = "Sélection";
69
        this.titresCol[5] = "Liste";
69
        this.titresCol[5] = "Liste";
70
 
70
 
71
        this.titresRow = new String[3];
71
        this.titresRow = new String[3];
72
        this.titresRow[0] = "Débit";
72
        this.titresRow[0] = "Débit";
73
        this.titresRow[1] = "Crédit";
73
        this.titresRow[1] = "Crédit";
74
        this.titresRow[2] = "Solde";
74
        this.titresRow[2] = "Solde";
75
 
75
 
76
        updateTotauxCompte();
76
        updateTotauxCompte();
77
    }
77
    }
78
 
78
 
79
    public void setIdCompte(int id) {
79
    public void setIdCompte(int id) {
80
        this.idCpt = id;
80
        this.idCpt = id;
81
        updateTotauxCompte();
81
        updateTotauxCompte();
82
        updateSelection(null);
82
        updateSelection(null);
83
    }
83
    }
84
 
84
 
85
    public void updateSelection(int[] rowIndex) {
85
    public void updateSelection(int[] rowIndex) {
86
        this.creditSelection = 0;
86
        this.creditSelection = 0;
87
        this.debitSelection = 0;
87
        this.debitSelection = 0;
88
 
88
 
89
        if (rowIndex != null) {
89
        if (rowIndex != null) {
90
            for (int i = 0; i < rowIndex.length; i++) {
90
            for (int i = 0; i < rowIndex.length; i++) {
91
 
91
 
92
                SQLRow row = tableEcr.getRow(rowIndex[i]);
92
                SQLRow row = tableEcr.getRow(rowIndex[i]);
93
 
93
 
94
                if (row != null) {
94
                if (row != null) {
95
 
95
 
96
                    // if (row.getString("POINTEE").trim().length() == 0) {
96
                    // if (row.getString("POINTEE").trim().length() == 0) {
97
                    this.debitSelection += ((Long) row.getObject("DEBIT")).longValue();
97
                    this.debitSelection += ((Long) row.getObject("DEBIT")).longValue();
98
                    this.creditSelection += ((Long) row.getObject("CREDIT")).longValue();
98
                    this.creditSelection += ((Long) row.getObject("CREDIT")).longValue();
99
                    // }
99
                    // }
100
                    /*
100
                    /*
101
                     * else {
101
                     * else {
102
                     * 
102
                     * 
103
                     * this.debitSelection -= row.getFloat("DEBIT"); this.creditSelection -=
103
                     * this.debitSelection -= row.getFloat("DEBIT"); this.creditSelection -=
104
                     * row.getFloat("CREDIT"); }
104
                     * row.getFloat("CREDIT"); }
105
                     */
105
                     */
106
                }
106
                }
107
            }
107
            }
108
        }
108
        }
109
        this.fireTableDataChanged();
109
        this.fireTableDataChanged();
110
    }
110
    }
111
 
111
 
112
    private SwingWorker<String, Object> workerUpdater;
112
    private SwingWorker<String, Object> workerUpdater;
113
 
113
 
114
    public void updateTotauxCompte() {
114
    public void updateTotauxCompte() {
115
        updateTotauxCompte(null, null, null);
115
        updateTotauxCompte(null, null, null);
116
    }
116
    }
117
 
117
 
118
    public void updateTotauxCompte(final DeviseField depart, final DeviseField arrive, final DeviseField ecart) {
118
    public void updateTotauxCompte(final DeviseField depart, final DeviseField arrive, final DeviseField ecart) {
119
 
119
 
120
        final Date deb = panel.getDateDeb();
120
        final Date deb = panel.getDateDeb();
121
        final Date fin = panel.getDateFin();
121
        final Date fin = panel.getDateFin();
122
 
122
 
123
        if (workerUpdater != null) {
123
        if (workerUpdater != null) {
124
            workerUpdater.cancel(true);
124
            workerUpdater.cancel(true);
125
        }
125
        }
126
 
126
 
127
        workerUpdater = new SwingWorker<String, Object>() {
127
        workerUpdater = new SwingWorker<String, Object>() {
128
 
128
 
129
            @Override
129
            @Override
130
            protected String doInBackground() throws Exception {
130
            protected String doInBackground() throws Exception {
131
 
131
 
132
                SQLSelect sel = new SQLSelect();
132
                SQLSelect sel = new SQLSelect();
133
                sel.addSelect(tableEcr.getField("CREDIT"), "SUM");
133
                sel.addSelect(tableEcr.getField("CREDIT"), "SUM");
134
                sel.addSelect(tableEcr.getField("DEBIT"), "SUM");
134
                sel.addSelect(tableEcr.getField("DEBIT"), "SUM");
135
 
135
 
136
                Where w = new Where(tableEcr.getField("ID_COMPTE_PCE"), "=", PointageModel.this.idCpt);
136
                Where w = new Where(tableEcr.getField("ID_COMPTE_PCE"), "=", PointageModel.this.idCpt);
137
 
137
 
138
                if (deb != null && fin != null) {
138
                if (deb != null && fin != null) {
139
                    w = w.and(new Where(tableEcr.getField("DATE"), deb, fin));
139
                    w = w.and(new Where(tableEcr.getField("DATE"), deb, fin));
140
                } else if (deb != null) {
140
                } else if (deb != null) {
141
                    w = w.and(new Where(tableEcr.getField("DATE"), ">=", deb));
141
                    w = w.and(new Where(tableEcr.getField("DATE"), ">=", deb));
142
                } else if (fin != null) {
142
                } else if (fin != null) {
143
                    w = w.and(new Where(tableEcr.getField("DATE"), "<=", fin));
143
                    w = w.and(new Where(tableEcr.getField("DATE"), "<=", fin));
144
                }
144
                }
145
                sel.setWhere(w.and(new Where(tableEcr.getField("POINTEE"), "!=", "")));
145
                sel.setWhere(w.and(new Where(tableEcr.getField("POINTEE"), "!=", "")));
146
 
146
 
147
                String reqPointee = sel.toString();
147
                String reqPointee = sel.toString();
148
 
148
 
149
                Object obPointee = base.getDataSource().execute(reqPointee, new ArrayListHandler());
149
                Object obPointee = base.getDataSource().execute(reqPointee, new ArrayListHandler());
150
 
150
 
151
                List myListPointee = (List) obPointee;
151
                List myListPointee = (List) obPointee;
152
 
152
 
153
                PointageModel.this.creditPointe = 0;
153
                PointageModel.this.creditPointe = 0;
154
                PointageModel.this.debitPointe = 0;
154
                PointageModel.this.debitPointe = 0;
155
                if (!myListPointee.isEmpty()) {
155
                if (!myListPointee.isEmpty()) {
156
 
156
 
157
                    for (int i = 0; i < myListPointee.size(); i++) {
157
                    for (int i = 0; i < myListPointee.size(); i++) {
158
                        Object[] objTmp = (Object[]) myListPointee.get(i);
158
                        Object[] objTmp = (Object[]) myListPointee.get(i);
159
 
159
 
160
                        if (objTmp[0] != null) {
160
                        if (objTmp[0] != null) {
161
                            PointageModel.this.creditPointe += ((Number) objTmp[0]).longValue();
161
                            PointageModel.this.creditPointe += ((Number) objTmp[0]).longValue();
162
                        }
162
                        }
163
                        if (objTmp[1] != null) {
163
                        if (objTmp[1] != null) {
164
                            PointageModel.this.debitPointe += ((Number) objTmp[1]).longValue();
164
                            PointageModel.this.debitPointe += ((Number) objTmp[1]).longValue();
165
                        }
165
                        }
166
                    }
166
                    }
167
                }
167
                }
168
 
168
 
169
                sel.setWhere(w.and(new Where(tableEcr.getField("POINTEE"), "=", panel.getCodePointage())));
169
                sel.setWhere(w.and(new Where(tableEcr.getField("POINTEE"), "=", panel.getCodePointage())));
170
                String reqReleveCourant = sel.toString();
170
                String reqReleveCourant = sel.toString();
171
 
171
 
172
                Object obReleveCourant = base.getDataSource().execute(reqReleveCourant, new ArrayListHandler());
172
                Object obReleveCourant = base.getDataSource().execute(reqReleveCourant, new ArrayListHandler());
173
 
173
 
174
                List myListReleveCourant = (List) obReleveCourant;
174
                List myListReleveCourant = (List) obReleveCourant;
175
 
175
 
176
                PointageModel.this.creditNonPointe = 0;
176
                PointageModel.this.creditNonPointe = 0;
177
                PointageModel.this.debitNonPointe = 0;
177
                PointageModel.this.debitNonPointe = 0;
178
                if (!myListReleveCourant.isEmpty()) {
178
                if (!myListReleveCourant.isEmpty()) {
179
 
179
 
180
                    for (int i = 0; i < myListReleveCourant.size(); i++) {
180
                    for (int i = 0; i < myListReleveCourant.size(); i++) {
181
                        Object[] objTmp = (Object[]) myListReleveCourant.get(i);
181
                        Object[] objTmp = (Object[]) myListReleveCourant.get(i);
182
 
182
 
183
                        if (objTmp[0] != null) {
183
                        if (objTmp[0] != null) {
184
                            PointageModel.this.creditNonPointe += ((Number) objTmp[0]).longValue();
184
                            PointageModel.this.creditNonPointe += ((Number) objTmp[0]).longValue();
185
                        }
185
                        }
186
 
186
 
187
                        if (objTmp[1] != null) {
187
                        if (objTmp[1] != null) {
188
                            PointageModel.this.debitNonPointe += ((Number) objTmp[1]).longValue();
188
                            PointageModel.this.debitNonPointe += ((Number) objTmp[1]).longValue();
189
                        }
189
                        }
190
                    }
190
                    }
191
                }
191
                }
192
 
192
 
193
                sel.setWhere(w);
193
                sel.setWhere(w);
194
                String reqReleveTotal = sel.toString();
194
                String reqReleveTotal = sel.toString();
195
 
195
 
196
                Object obReleveTotal = base.getDataSource().execute(reqReleveTotal, new ArrayListHandler());
196
                Object obReleveTotal = base.getDataSource().execute(reqReleveTotal, new ArrayListHandler());
197
 
197
 
198
                List myListReleveTotal = (List) obReleveTotal;
198
                List myListReleveTotal = (List) obReleveTotal;
199
 
199
 
200
                PointageModel.this.creditTotal = 0;
200
                PointageModel.this.creditTotal = 0;
201
                PointageModel.this.debitTotal = 0;
201
                PointageModel.this.debitTotal = 0;
202
                if (!myListReleveTotal.isEmpty()) {
202
                if (!myListReleveTotal.isEmpty()) {
203
 
203
 
204
                    for (int i = 0; i < myListReleveTotal.size(); i++) {
204
                    for (int i = 0; i < myListReleveTotal.size(); i++) {
205
                        Object[] objTmp = (Object[]) myListReleveTotal.get(i);
205
                        Object[] objTmp = (Object[]) myListReleveTotal.get(i);
206
 
206
 
207
                        if (objTmp[0] != null) {
207
                        if (objTmp[0] != null) {
208
                            PointageModel.this.creditTotal += ((Number) objTmp[0]).longValue();
208
                            PointageModel.this.creditTotal += ((Number) objTmp[0]).longValue();
209
                        }
209
                        }
210
 
210
 
211
                        if (objTmp[1] != null) {
211
                        if (objTmp[1] != null) {
212
                            PointageModel.this.debitTotal += ((Number) objTmp[1]).longValue();
212
                            PointageModel.this.debitTotal += ((Number) objTmp[1]).longValue();
213
                        }
213
                        }
214
                    }
214
                    }
215
                }
215
                }
216
 
216
 
217
                PointageModel.this.creditListe = 0;
217
                PointageModel.this.creditListe = 0;
218
                PointageModel.this.debitListe = 0;
218
                PointageModel.this.debitListe = 0;
219
                IListe listeEcr = panel.getEcriturePanel().getListe();
219
                IListe listeEcr = panel.getEcriturePanel().getListe();
220
                for (int i = 0; i < listeEcr.getRowCount(); i++) {
220
                for (int i = 0; i < listeEcr.getRowCount(); i++) {
221
 
221
 
222
                    final SQLRowValues rowAt = ITableModel.getLine(listeEcr.getModel(), i).getRow();
222
                    final SQLRowValues rowAt = ITableModel.getLine(listeEcr.getModel(), i).getRow();
223
                    if (rowAt.getObject("CREDIT") != null) {
223
                    if (rowAt.getObject("CREDIT") != null) {
224
                        PointageModel.this.creditListe += rowAt.getLong("CREDIT");
224
                        PointageModel.this.creditListe += rowAt.getLong("CREDIT");
225
                    }
225
                    }
226
 
226
 
227
                    if (rowAt.getObject("DEBIT") != null) {
227
                    if (rowAt.getObject("DEBIT") != null) {
228
                        PointageModel.this.debitListe += rowAt.getLong("DEBIT");
228
                        PointageModel.this.debitListe += rowAt.getLong("DEBIT");
229
                    }
229
                    }
230
                }
230
                }
231
 
231
 
232
                return null;
232
                return null;
233
            }
233
            }
234
 
234
 
235
            @Override
235
            @Override
236
            protected void done() {
236
            protected void done() {
237
 
237
 
238
                if (isCancelled()) {
238
                if (isCancelled()) {
239
                    return;
239
                    return;
240
                }
240
                }
241
                if (arrive != null && depart != null && ecart != null) {
241
                if (arrive != null && depart != null && ecart != null) {
242
                    final Long valueArrive = arrive.getValue();
242
                    final Long valueArrive = arrive.getValue();
243
                    final Long valueDepart = depart.getValue();
243
                    final Long valueDepart = depart.getValue();
244
                    if (valueArrive != null && valueDepart != null) {
244
                    if (valueArrive != null && valueDepart != null) {
245
                        ecart.setValue(valueArrive - valueDepart + PointageModel.this.debitNonPointe - PointageModel.this.creditNonPointe);
245
                        ecart.setValue(valueArrive - valueDepart - PointageModel.this.debitNonPointe + PointageModel.this.creditNonPointe);
246
                    } else {
246
                    } else {
247
                        ecart.setValue(null);
247
                        ecart.setValue(null);
248
                    }
248
                    }
249
                }
249
                }
250
                PointageModel.this.fireTableDataChanged();
250
                PointageModel.this.fireTableDataChanged();
251
            }
251
            }
252
        };
252
        };
253
        workerUpdater.execute();
253
        workerUpdater.execute();
254
 
254
 
255
    }
255
    }
256
 
256
 
257
    @Override
257
    @Override
258
    public String getColumnName(int column) {
258
    public String getColumnName(int column) {
259
 
259
 
260
        return this.titresCol[column];
260
        return this.titresCol[column];
261
    }
261
    }
262
 
262
 
263
    public int getColumnCount() {
263
    public int getColumnCount() {
264
 
264
 
265
        return this.titresCol.length;
265
        return this.titresCol.length;
266
    }
266
    }
267
 
267
 
268
    public int getRowCount() {
268
    public int getRowCount() {
269
 
269
 
270
        return this.titresRow.length;
270
        return this.titresRow.length;
271
    }
271
    }
272
 
272
 
273
    @Override
273
    @Override
274
    public Class<?> getColumnClass(int columnIndex) {
274
    public Class<?> getColumnClass(int columnIndex) {
275
        if (columnIndex == 0) {
275
        if (columnIndex == 0) {
276
            return String.class;
276
            return String.class;
277
        } else {
277
        } else {
278
            return Long.class;
278
            return Long.class;
279
        }
279
        }
280
    }
280
    }
281
 
281
 
282
    public Object getValueAt(int rowIndex, int columnIndex) {
282
    public Object getValueAt(int rowIndex, int columnIndex) {
283
 
283
 
284
        if (columnIndex == 0) {
284
        if (columnIndex == 0) {
285
            return this.titresRow[rowIndex];
285
            return this.titresRow[rowIndex];
286
        }
286
        }
287
 
287
 
288
        if (columnIndex == 1) {
288
        if (columnIndex == 1) {
289
            if (rowIndex == 0) {
289
            if (rowIndex == 0) {
290
                return Long.valueOf(this.debitPointe);
290
                return Long.valueOf(this.debitPointe);
291
            }
291
            }
292
            if (rowIndex == 1) {
292
            if (rowIndex == 1) {
293
                return Long.valueOf(this.creditPointe);
293
                return Long.valueOf(this.creditPointe);
294
            }
294
            }
295
            if (rowIndex == 2) {
295
            if (rowIndex == 2) {
296
                return Long.valueOf(this.debitPointe - this.creditPointe);
296
                return Long.valueOf(this.debitPointe - this.creditPointe);
297
            }
297
            }
298
        }
298
        }
299
 
299
 
300
        if (columnIndex == 2) {
300
        if (columnIndex == 2) {
301
            if (rowIndex == 0) {
301
            if (rowIndex == 0) {
302
                return Long.valueOf(this.debitNonPointe);
302
                return Long.valueOf(this.debitNonPointe);
303
            }
303
            }
304
            if (rowIndex == 1) {
304
            if (rowIndex == 1) {
305
                return Long.valueOf(this.creditNonPointe);
305
                return Long.valueOf(this.creditNonPointe);
306
            }
306
            }
307
            if (rowIndex == 2) {
307
            if (rowIndex == 2) {
308
                return Long.valueOf(this.debitNonPointe - this.creditNonPointe);
308
                return Long.valueOf(this.debitNonPointe - this.creditNonPointe);
309
            }
309
            }
310
        }
310
        }
311
 
311
 
312
        if (columnIndex == 3) {
312
        if (columnIndex == 3) {
313
            if (rowIndex == 0) {
313
            if (rowIndex == 0) {
314
                return Long.valueOf(this.debitTotal);
314
                return Long.valueOf(this.debitTotal);
315
            }
315
            }
316
            if (rowIndex == 1) {
316
            if (rowIndex == 1) {
317
                return Long.valueOf(this.creditTotal);
317
                return Long.valueOf(this.creditTotal);
318
            }
318
            }
319
            if (rowIndex == 2) {
319
            if (rowIndex == 2) {
320
                return Long.valueOf(this.debitTotal - this.creditTotal);
320
                return Long.valueOf(this.debitTotal - this.creditTotal);
321
            }
321
            }
322
        }
322
        }
323
 
323
 
324
        if (columnIndex == 4) {
324
        if (columnIndex == 4) {
325
            if (rowIndex == 0) {
325
            if (rowIndex == 0) {
326
                return Long.valueOf(this.debitSelection);
326
                return Long.valueOf(this.debitSelection);
327
            }
327
            }
328
            if (rowIndex == 1) {
328
            if (rowIndex == 1) {
329
                return Long.valueOf(this.creditSelection);
329
                return Long.valueOf(this.creditSelection);
330
            }
330
            }
331
            if (rowIndex == 2) {
331
            if (rowIndex == 2) {
332
                return Long.valueOf(this.debitSelection - this.creditSelection);
332
                return Long.valueOf(this.debitSelection - this.creditSelection);
333
            }
333
            }
334
        }
334
        }
335
 
335
 
336
        if (columnIndex == 5) {
336
        if (columnIndex == 5) {
337
            if (rowIndex == 0) {
337
            if (rowIndex == 0) {
338
                return Long.valueOf(this.debitListe);
338
                return Long.valueOf(this.debitListe);
339
            }
339
            }
340
            if (rowIndex == 1) {
340
            if (rowIndex == 1) {
341
                return Long.valueOf(this.creditListe);
341
                return Long.valueOf(this.creditListe);
342
            }
342
            }
343
            if (rowIndex == 2) {
343
            if (rowIndex == 2) {
344
                return Long.valueOf(this.debitListe - this.creditListe);
344
                return Long.valueOf(this.debitListe - this.creditListe);
345
            }
345
            }
346
        }
346
        }
347
 
347
 
348
        return null;
348
        return null;
349
    }
349
    }
350
}
350
}