OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | 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.core.finance.accounting.report;
15
 
132 ilm 16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
17
import org.openconcerto.erp.config.Gestion;
18
import org.openconcerto.erp.core.finance.accounting.model.SommeCompte;
19
import org.openconcerto.sql.Configuration;
20
import org.openconcerto.sql.model.SQLRow;
21
import org.openconcerto.utils.GestionDevise;
22
 
18 ilm 23
import java.text.DateFormat;
24
import java.text.SimpleDateFormat;
25
import java.util.Date;
26
import java.util.HashMap;
27
import java.util.Map;
28
 
29
import javax.swing.JProgressBar;
30
import javax.swing.SwingUtilities;
31
 
32
public class Map2033B extends Thread {
33
    private Map<String, String> m;
142 ilm 34
    private final DateFormat format = new SimpleDateFormat("ddMMyyyy");
18 ilm 35
    private JProgressBar bar;
36
    private Date dateDeb, dateFin;
37
    SommeCompte sommeCompte;
38
 
39
    public void run() {
40
 
41
        final PdfGenerator_2033B p = new PdfGenerator_2033B();
42
 
43
        this.m = new HashMap<String, String>();
44
 
45
        SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
46
        this.m.put("NOM", rowSociete.getString("TYPE") + " " + rowSociete.getString("NOM"));
47
 
48
        // SQLRow rowExercice =
49
        // Configuration.getInstance().getBase().getTable("EXERCICE_COMMON").getRow(rowSociete.getInt("ID_EXERCICE_COMMON"));
50
        // Date dateFin = (Date) rowExercice.getObject("DATE_FIN");
51
        // Date dateDeb = (Date) rowExercice.getObject("DATE_DEB");
52
        this.m.put("CLOS1", format.format(this.dateFin));
53
        this.m.put("CLOS2", "");
54
 
55
        /*******************************************************************************************
56
         * A - RESULTAT COMPTABLE
57
         ******************************************************************************************/
58
 
59
        /*******************************************************************************************
60
         * PRODUITS D'EXPLOITATION
61
         ******************************************************************************************/
62
 
63
        /*******************************************************************************************
64
         * VENTES DE MARCHANDISES
65
         ******************************************************************************************/
66
        // 209
67
        long v209 = 0;
68
        this.m.put("PRODUIT1.0", GestionDevise.currencyToString(v209, false));
69
 
70
        // 210 -SommeSolde( 707, 707* )-SommeSolde( 7097, 7097* )
71
        long v210 = -this.sommeCompte.soldeCompte(707, 707, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(7097, 7097, true, this.dateDeb, this.dateFin);
72
        this.m.put("PRODUIT2.0", GestionDevise.currencyToString(v210, false));
73
 
74
        // 200
75
        this.m.put("PRODUIT3.0", "");
76
 
77
        /*******************************************************************************************
78
         * PRODUCTION VENDUE ---> BIEN
79
         ******************************************************************************************/
80
        // 215
81
        long v215 = 0;
82
        this.m.put("PRODUIT1.1", GestionDevise.currencyToString(v215, false));
83
 
84
        // 214 -SommeSolde( 700, 705* )-SommeSolde( 7090, 7095* )
85
        long v214 = -this.sommeCompte.soldeCompte(700, 705, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(7090, 7095, true, this.dateDeb, this.dateFin);
86
        this.m.put("PRODUIT2.1", GestionDevise.currencyToString(v214, false));
87
 
88
        // 201
89
        this.m.put("PRODUIT3.1", "");
90
 
91
        /*******************************************************************************************
92
         * PRODUCTION VENDUE ---> SERVICES
93
         ******************************************************************************************/
94
        // 217
95
        long v217 = 0;
96
        this.m.put("PRODUIT1.2", GestionDevise.currencyToString(v217, false));
97
 
98
        // 218 -SommeSolde( 706, 706* )-SommeSolde( 708, 708* )-SommeSolde( 7096, 7096*
99
        // )-SommeSolde( 7098, 7099* )
100
        long v218 = -this.sommeCompte.soldeCompte(706, 706, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(708, 708, true, this.dateDeb, this.dateFin)
101
                - this.sommeCompte.soldeCompte(7096, 7096, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(7098, 7099, true, this.dateDeb, this.dateFin);
102
        this.m.put("PRODUIT2.2", GestionDevise.currencyToString(v218, false));
103
 
104
        // 202
105
        this.m.put("PRODUIT3.2", "");
106
 
107
        SwingUtilities.invokeLater(new Runnable() {
108
            public void run() {
109
 
110
                Map2033B.this.bar.setValue(10);
111
            }
112
        });
113
 
114
        /*******************************************************************************************
115
         * PRODUCTION STOCKEE
116
         ******************************************************************************************/
117
        // 222 -SommeSolde( 710, 719* )
118
        long v222 = -this.sommeCompte.soldeCompte(713, 713, true, this.dateDeb, this.dateFin);
119
        this.m.put("PRODUIT2.3", GestionDevise.currencyToString(v222, false));
120
 
121
        // 203
122
        this.m.put("PRODUIT3.3", "");
123
 
124
        /*******************************************************************************************
125
         * PRODUCTION IMMOBILISEE
126
         ******************************************************************************************/
127
        // 224 -SommeSolde( 72, 72* )
128
        long v224 = -this.sommeCompte.soldeCompte(72, 73, true, this.dateDeb, this.dateFin);
129
        this.m.put("PRODUIT2.4", GestionDevise.currencyToString(v224, false));
130
 
131
        // 204
132
        this.m.put("PRODUIT3.4", "");
133
 
134
        /*******************************************************************************************
135
         * SUBVENTION D'EXPLOITATION
136
         ******************************************************************************************/
137
        // 226 -SommeSolde( 74, 74* )
138
        long v226 = -this.sommeCompte.soldeCompte(74, 74, true, this.dateDeb, this.dateFin);
139
        this.m.put("PRODUIT2.5", GestionDevise.currencyToString(v226, false));
140
 
141
        // 205
142
        this.m.put("PRODUIT3.5", "");
143
 
144
        /*******************************************************************************************
145
         * AUTRES PRODUITS
146
         ******************************************************************************************/
147
        // 230 -SommeSolde( 73, 73* )-SommeSolde( 75, 75* )-SommeSolde( 780, 785* )-SommeSolde( 790,
148
        // 795* )
149
        long v230 = -this.sommeCompte.soldeCompte(75, 75, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(780, 785, true, this.dateDeb, this.dateFin)
150
                - this.sommeCompte.soldeCompte(790, 795, true, this.dateDeb, this.dateFin);
151
        this.m.put("PRODUIT2.6", GestionDevise.currencyToString(v230, false));
152
 
153
        // 206
154
        this.m.put("PRODUIT3.6", "");
155
 
156
        SwingUtilities.invokeLater(new Runnable() {
157
            public void run() {
158
                Map2033B.this.bar.setValue(20);
159
            }
160
        });
161
        /*******************************************************************************************
162
         * TOTAL I
163
         ******************************************************************************************/
164
        // 232 v210+v214+v218+v222+v224+v226+v230
165
        long v232 = v210 + v214 + v218 + v222 + v224 + v226 + v230;
166
        this.m.put("PRODUIT2.7", GestionDevise.currencyToString(v232, false));
167
 
168
        // 207
169
        this.m.put("PRODUIT3.7", "");
170
 
171
        /*******************************************************************************************
172
         * CHARGES D'EXPLOITATION
173
         ******************************************************************************************/
174
 
175
        /*******************************************************************************************
176
         * ACHATS DE MARCHANDISES
177
         ******************************************************************************************/
178
        // 234 SommeSolde( 607, 608* )+SommeSolde( 6097, 6097* )
179
        long v234 = this.sommeCompte.soldeCompte(607, 607, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(6097, 6097, true, this.dateDeb, this.dateFin)
180
                + this.sommeCompte.soldeCompte(6087, 6087, true, this.dateDeb, this.dateFin);
181
        this.m.put("CHARGES3.8", GestionDevise.currencyToString(v234, false));
182
 
183
        // 208
184
        this.m.put("CHARGES4.8", "");
185
 
186
        /*******************************************************************************************
187
         * VARIATION DE STOCK
188
         ******************************************************************************************/
189
        // 236 SommeSolde( 6037, 6039* )
190
        long v236 = this.sommeCompte.soldeCompte(6037, 6037, true, this.dateDeb, this.dateFin);
191
        this.m.put("CHARGES3.9", GestionDevise.currencyToString(v236, false));
192
 
193
        // 211
194
        this.m.put("CHARGES4.9", "");
195
 
196
        /*******************************************************************************************
197
         * ACHATS DE MATIERE PREMIERE
198
         ******************************************************************************************/
199
        // 238 SommeSolde( 600, 602* )+SommeSolde( 6090, 6092* )
200
        // S238=601+602+6091+6092
94 ilm 201
        // FIX Abaque ajout 609
202
        long v238 = this.sommeCompte.soldeCompte(601, 602, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(609, 609, true, this.dateDeb, this.dateFin)
203
                - this.sommeCompte.soldeCompte(6093, 6099, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(6081, 6082, true, this.dateDeb, this.dateFin);
18 ilm 204
        this.m.put("CHARGES3.10", GestionDevise.currencyToString(v238, false));
205
 
206
        // 212
207
        this.m.put("CHARGES4.10", "");
208
 
209
        SwingUtilities.invokeLater(new Runnable() {
210
            public void run() {
211
                Map2033B.this.bar.setValue(40);
212
            }
213
        });
214
        /*******************************************************************************************
215
         * VARIATION DE STOCK
216
         ******************************************************************************************/
217
        // 240 SommeSolde( 6030, 6036* )
174 ilm 218
        long v240 = this.sommeCompte.soldeCompte(6031, 6036, true, this.dateDeb, this.dateFin);
18 ilm 219
        this.m.put("CHARGES3.11", GestionDevise.currencyToString(v240, false));
220
 
221
        // 213
222
        this.m.put("CHARGES4.11", "");
223
 
224
        /*******************************************************************************************
225
         * AUTRES CHARGES EXTERNES
226
         ******************************************************************************************/
227
 
228
        // S242M=6122
229
        this.m.put("CBAIL_MO12", GestionDevise.currencyToString(this.sommeCompte.sommeCompteFils("6122", this.dateDeb, this.dateFin), false));
230
 
231
        // S242I=6125
232
        this.m.put("CBAIL_IMMO12", GestionDevise.currencyToString(this.sommeCompte.sommeCompteFils("6125", this.dateDeb, this.dateFin), false));
233
 
234
        // 242 SommeSolde( 604, 606* )+SommeSolde( 6093, 6096* )+SommeSolde( 6098, 6099*
235
        // )+SommeSolde( 61, 62* )
236
        // S242=604...606+6094...6096+6098+611+6122+6125+613...619+621...629
237
        long v242 = this.sommeCompte.soldeCompte(604, 606, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(6084, 6086, true, this.dateDeb, this.dateFin)
238
                + this.sommeCompte.soldeCompte(6094, 6096, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(61, 62, true, this.dateDeb, this.dateFin);
239
        this.m.put("CHARGES3.12", GestionDevise.currencyToString(v242, false));
240
 
241
        // 216
242
        this.m.put("CHARGES4.12", "");
243
 
244
        /*******************************************************************************************
245
         * IMPOTS, TAXES
246
         ******************************************************************************************/
247
        // 243
248
        this.m.put("CHARGES1.13", "");
249
 
250
        // 244 SommeSolde( 63, 63* )
251
        long v244 = this.sommeCompte.soldeCompte(63, 63, true, this.dateDeb, this.dateFin);
252
        this.m.put("CHARGES2.13", GestionDevise.currencyToString(v244, false));
253
 
254
        // 219
255
        this.m.put("CHARGES3.13", "");
256
 
257
        SwingUtilities.invokeLater(new Runnable() {
258
            public void run() {
259
                Map2033B.this.bar.setValue(50);
260
            }
261
        });
262
        /*******************************************************************************************
263
         * REMUNERATION Du PERSONNEL
264
         ******************************************************************************************/
265
        // 250 SommeSolde( 640, 644* )+SommeSolde( 648, 649* )
132 ilm 266
        long v250 = this.sommeCompte.soldeCompte(644, 644, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(648, 649, true, this.dateDeb, this.dateFin)
174 ilm 267
                + this.sommeCompte.soldeCompte(641, 641, true, this.dateDeb, this.dateFin)+ this.sommeCompte.soldeCompte(642, 642, true, this.dateDeb, this.dateFin);
18 ilm 268
        this.m.put("CHARGES3.14", GestionDevise.currencyToString(v250, false));
269
 
270
        // 220
271
        this.m.put("CHARGES4.14", "");
272
 
273
        /*******************************************************************************************
274
         * CHARGES SOCIALES
275
         ******************************************************************************************/
276
        // 252 SommeSolde( 645, 647* )
94 ilm 277
        long v252 = this.sommeCompte.soldeCompte(645, 647, true, this.dateDeb, this.dateFin);
18 ilm 278
        this.m.put("CHARGES3.15", GestionDevise.currencyToString(v252, false));
279
 
280
        // 221
281
        this.m.put("CHARGES4.15", "");
282
 
283
        /*******************************************************************************************
284
         * DOTATIONS AUX AMMORTISSEMENTS
285
         ******************************************************************************************/
286
        // 254 SommeSolde( 6800, 6814* )
287
        long v254 = this.sommeCompte.soldeCompte(6811, 6812, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(6816, 6817, true, this.dateDeb, this.dateFin);
288
        this.m.put("CHARGES3.16", GestionDevise.currencyToString(v254, false));
289
 
290
        // 221
291
        this.m.put("CHARGES4.16", "");
292
 
293
        SwingUtilities.invokeLater(new Runnable() {
294
            public void run() {
295
                Map2033B.this.bar.setValue(60);
296
            }
297
        });
298
        /*******************************************************************************************
299
         * DOTATIONS AUX PROVISIONS
300
         ******************************************************************************************/
301
        // 256 SommeSolde( 6815, 6859* )
302
        long v256 = this.sommeCompte.soldeCompte(6815, 6815, true, this.dateDeb, this.dateFin);
303
        this.m.put("CHARGES3.17", GestionDevise.currencyToString(v256, false));
304
 
305
        // 222
306
        this.m.put("CHARGES4.17", "");
307
 
308
        /*******************************************************************************************
309
         * AUTRES CHARGES
310
         ******************************************************************************************/
311
        // 259
312
        this.m.put("CHARGES1.18", "");
313
 
314
        // 262 SommeSolde( 65, 65* )
315
        long v262 = this.sommeCompte.soldeCompte(65, 65, true, this.dateDeb, this.dateFin);
316
        this.m.put("CHARGES2.18", GestionDevise.currencyToString(v262, false));
317
 
318
        // 228
319
        this.m.put("CHARGES3.18", "");
320
 
321
        SwingUtilities.invokeLater(new Runnable() {
322
            public void run() {
323
                Map2033B.this.bar.setValue(70);
324
            }
325
        });
326
 
327
        /*******************************************************************************************
328
         * TOTAL II
329
         ******************************************************************************************/
330
        // 264 v234+v236+v238+v240+v242+v244+v250+v252+v254+v256+v262
331
        long v264 = v234 + v236 + v238 + v240 + v242 + v244 + v250 + v252 + v254 + v256 + v262;
332
        this.m.put("PCHARGES3.19", GestionDevise.currencyToString(v264, false));
333
 
334
        // 231
335
        this.m.put("PCHARGES4.19", "");
336
 
337
        /*******************************************************************************************
338
         * RESULTAT D'EXPLOTATION
339
         ******************************************************************************************/
340
        // 270 v232-v264
341
        long v270 = v232 - v264;
342
        this.m.put("PCHARGES3.20", GestionDevise.currencyToString(v270, false));
343
 
344
        // 235
345
        this.m.put("PCHARGES4.20", "");
346
 
347
        /*******************************************************************************************
348
         * PRODUITS ET CHARGES DIVERS
349
         ******************************************************************************************/
350
 
351
        /*******************************************************************************************
352
         * PRODUITS FINANCIERS
353
         ******************************************************************************************/
354
        // 280 -SommeSolde( 760, 769* )-SommeSolde( 786, 786* )-SommeSolde( 796, 796* )
174 ilm 355
        long v280 = -this.sommeCompte.soldeCompte(760, 768, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(786, 786, true, this.dateDeb, this.dateFin)
18 ilm 356
                - this.sommeCompte.soldeCompte(796, 796, true, this.dateDeb, this.dateFin);
357
        this.m.put("PCHARGES3.21", GestionDevise.currencyToString(v280, false));
358
 
359
        // 237
360
        this.m.put("PCHARGES4.21", "");
361
 
362
        SwingUtilities.invokeLater(new Runnable() {
363
            public void run() {
364
                Map2033B.this.bar.setValue(80);
365
            }
366
        });
367
 
368
        /*******************************************************************************************
369
         * PRODUITS EXCEPTIONNELS
370
         ******************************************************************************************/
371
        // 290 -SommeSolde( 77, 77* )-SommeSolde( 787, 789* )-SommeSolde( 797, 799* )
174 ilm 372
        long v290 = -this.sommeCompte.soldeCompte(770, 772, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(775, 778, true, this.dateDeb, this.dateFin)
18 ilm 373
                - this.sommeCompte.soldeCompte(787, 787, true, this.dateDeb, this.dateFin) - this.sommeCompte.soldeCompte(797, 797, true, this.dateDeb, this.dateFin);
374
        this.m.put("PCHARGES3.22", GestionDevise.currencyToString(v290, false));
375
 
376
        // 245
377
        this.m.put("PCHARGES4.22", "");
378
 
379
        /*******************************************************************************************
380
         * CHARGES FINANCIERES
381
         ******************************************************************************************/
382
        // 294 SommeSolde( 66, 66* )+SommeSolde( 686, 686* )
383
        long v294 = this.sommeCompte.soldeCompte(661, 661, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(686, 686, true, this.dateDeb, this.dateFin)
384
                + this.sommeCompte.soldeCompte(664, 668, true, this.dateDeb, this.dateFin);
385
        this.m.put("PCHARGES3.23", GestionDevise.currencyToString(v294, false));
386
 
387
        // 246
388
        this.m.put("PCHARGES4.23", "");
389
 
390
        /*******************************************************************************************
391
         * CHARGES EXCEPTIONNELLES
392
         ******************************************************************************************/
393
        // 300 SommeSolde( 67, 67* )+SommeSolde( 687, 689* )
394
        long v300 = this.sommeCompte.soldeCompte(67, 67, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(687, 687, true, this.dateDeb, this.dateFin);
395
        this.m.put("PCHARGES3.24", GestionDevise.currencyToString(v300, false));
396
 
397
        // 247
398
        this.m.put("PCHARGES4.24", "");
399
 
400
        SwingUtilities.invokeLater(new Runnable() {
401
            public void run() {
402
                Map2033B.this.bar.setValue(90);
403
            }
404
        });
405
        /*******************************************************************************************
406
         * IMPOTS SUR LES BENEFICES
407
         ******************************************************************************************/
408
        // 306 SommeSolde( 69, 69* )
409
        long v306 = this.sommeCompte.soldeCompte(697, 699, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(695, 695, true, this.dateDeb, this.dateFin)
410
                + this.sommeCompte.soldeCompte(689, 689, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(789, 789, true, this.dateDeb, this.dateFin);
411
        this.m.put("PCHARGES3.25", GestionDevise.currencyToString(v306, false));
412
 
413
        // 257
414
        this.m.put("PCHARGES4.25", "");
415
 
416
        /*******************************************************************************************
417
         * BENEFICE OU PERTE
418
         ******************************************************************************************/
419
        // 310 v232+v280+v290-v264-v294-v300-v306
420
        long v310 = v232 + v280 + v290 - v264 - v294 - v300 - v306;
421
        this.m.put("PCHARGES3.26", GestionDevise.currencyToString(v310, false));
422
 
423
        // 267
424
        this.m.put("PCHARGES4.26", "");
425
 
426
        /*******************************************************************************************
427
         * RESULTAT FISCAL
428
         ******************************************************************************************/
429
        // 312
430
        // 374 SommeSoldeDebit( 4457, 4457* )
149 ilm 431
        // TODO répartir les comptes débiteurs
432
        long v374 = this.sommeCompte.soldeCompteCrediteur(4457, 4457, true, this.dateDeb, this.dateFin);
18 ilm 433
        this.m.put("T1.41", GestionDevise.currencyToString(v374, false));
434
 
435
        // 378 SommeSoldeCredit( 44566 )
149 ilm 436
        long v378 = this.sommeCompte.soldeCompteDebiteur(44566, 44566, true, this.dateDeb, this.dateFin);
18 ilm 437
        this.m.put("T1.42", GestionDevise.currencyToString(v378, false));
438
 
439
        SwingUtilities.invokeLater(new Runnable() {
440
            public void run() {
441
                Map2033B.this.bar.setValue(95);
442
            }
443
        });
444
        /*******************************************************************************************
445
         * VALEURS NON CONNUES
446
         ******************************************************************************************/
447
        this.m.put("PCHARGES3.27", "");
448
        this.m.put("PCHARGES4.27", "");
449
 
450
        this.m.put("REINT3.28", "");
451
        this.m.put("REINT3.29", "");
452
        this.m.put("REINT3.30", "");
453
        this.m.put("REINT3.31", "");
454
        this.m.put("REINT1.32", "");
455
        this.m.put("REINT2.32", "");
456
        this.m.put("REINT3.32", "");
457
 
458
        this.m.put("DEDUC1.33", "");
459
        this.m.put("DEDUC2.33", "");
460
        this.m.put("DEDUC3.33", "");
461
        this.m.put("DEDUC1.34", "");
462
        this.m.put("DEDUC2.34", "");
463
        this.m.put("DEDUC3.34", "");
464
        this.m.put("DEDUC4.34", "");
465
 
466
        this.m.put("DEDUC2.35", "");
467
        this.m.put("DEDUC3.35", "");
468
        this.m.put("DEDUC4.35", "");
469
 
470
        this.m.put("RES3.36", "");
471
        this.m.put("RES4.36", "");
472
 
473
        this.m.put("DEF3.37", "");
474
        this.m.put("DEF4.38", "");
475
        this.m.put("RES3.39", "");
476
        this.m.put("RES4.39", "");
477
 
478
        this.m.put("COT1.40", "");
479
        this.m.put("COT2.40", "");
480
        this.m.put("COT3.40", "");
481
 
482
        this.m.put("T2.41", "");
483
        this.m.put("T3.41", "");
484
        this.m.put("T4.41", "");
485
        this.m.put("T2.42", "");
486
 
132 ilm 487
        // final SQLField field =
488
        // ComptaPropsConfiguration.getInstanceCompta().getRootSociete().getTable("COMPTE_PCE").getField("NUMERO");
489
        // Where where = new Where(field, "LIKE", "6%");
490
        // where = where.or(new Where(field, "LIKE", "7%"));
491
        // this.sommeCompte.getNonUsedCompte(where, this.dateDeb, this.dateFin);
18 ilm 492
        p.generateFrom(this.m);
493
 
494
        SwingUtilities.invokeLater(new Runnable() {
495
            public void run() {
156 ilm 496
                Gestion.openPDF(p.getGeneratedFile());
18 ilm 497
                Map2033B.this.bar.setValue(100);
498
            }
499
        });
500
    }
501
 
502
    public Map2033B(JProgressBar bar, Date dateDeb, Date dateFin) {
503
        this(bar, dateDeb, dateFin, null);
504
    }
505
 
506
    public Map2033B(JProgressBar bar, Date dateDeb, Date dateFin, SQLRow rowPosteAnalytique) {
507
        this.bar = bar;
508
 
509
        if (dateDeb == null && dateFin == null) {
510
            SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
511
            SQLRow rowExercice = Configuration.getInstance().getBase().getTable("EXERCICE_COMMON").getRow(rowSociete.getInt("ID_EXERCICE_COMMON"));
512
            dateFin = (Date) rowExercice.getObject("DATE_FIN");
513
            dateDeb = (Date) rowExercice.getObject("DATE_DEB");
514
        }
515
 
516
        this.dateDeb = dateDeb;
517
        this.dateFin = dateFin;
518
        this.sommeCompte = new SommeCompte(rowPosteAnalytique);
519
    }
520
 
521
    public Map2033B(JProgressBar b) {
522
        this(b, null, null);
523
    }
524
 
525
    public void generateMap() {
526
        this.start();
527
    }
528
 
529
}