OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 151 | Rev 174 | Go to most recent revision | 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
 
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
 
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 Map2033A extends Thread {
33
 
156 ilm 34
    private Map<String, String> m;
142 ilm 35
    private final DateFormat format = new SimpleDateFormat("ddMMyyyy");
18 ilm 36
    private JProgressBar bar;
37
    private Date dateDebut, dateFin;
38
    SommeCompte sommeCompte;
39
 
142 ilm 40
    // Debugger un bilan non réparti
41
    // Faire le bilan mois par mois pour retrouver à partir de quel date le bilan est déséquilibré,
42
    // puis comparer les balances J J-1 pour trouver les différences ( ou le grand livre)
43
    // --> Utiliser Check Bilan ACtion pour retrouver les mouvements qui ne sont pas bien réparti
44
    // entre actif et passif
45
 
18 ilm 46
    // TODO if value = 0.0 ne pas mettre -0.0
47
 
48
    public void run() {
49
 
50
        PdfGenerator_2033A p = new PdfGenerator_2033A();
156 ilm 51
        this.m = new HashMap();
18 ilm 52
 
53
        SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
54
        this.m.put("NOM", rowSociete.getString("TYPE") + " " + rowSociete.getString("NOM"));
55
        SQLRow rowAdresse = Configuration.getInstance().getBase().getTable("ADRESSE_COMMON").getRow(rowSociete.getInt("ID_ADRESSE_COMMON"));
56
 
73 ilm 57
        String ville = rowAdresse.getString("VILLE");
18 ilm 58
        final Object cedex = rowAdresse.getObject("CEDEX");
59
        final boolean hasCedex = rowAdresse.getBoolean("HAS_CEDEX");
60
 
61
        if (hasCedex) {
62
            ville += " CEDEX";
63
            if (cedex != null && cedex.toString().trim().length() > 0) {
64
                ville += " " + cedex.toString().trim();
65
            }
66
        }
73 ilm 67
        this.m.put("ADRESSE", rowAdresse.getString("RUE") + ", " + rowAdresse.getString("CODE_POSTAL") + " " + ville);
18 ilm 68
        this.m.put("SIRET", rowSociete.getString("NUM_SIRET"));
69
        this.m.put("APE", rowSociete.getString("NUM_APE"));
70
        this.m.put("DUREE1", "");
71
        this.m.put("DUREE2", "");
72
        SQLRow rowExercice = Configuration.getInstance().getBase().getTable("EXERCICE_COMMON").getRow(rowSociete.getInt("ID_EXERCICE_COMMON"));
73
        // Date dateFin = (Date) rowExercice.getObject("DATE_FIN");
74
        // Date dateDebut = (Date) rowExercice.getObject("DATE_DEB");
75
        this.m.put("CLOS1", format.format(this.dateFin));
76
        this.m.put("CLOS2", "");
77
 
78
        /*******************************************************************************************
79
         * ACTIF
80
         ******************************************************************************************/
81
 
82
        /*******************************************************************************************
83
         * IMMO INCORPORELLES --> FONDS COMMERCIAL
84
         ******************************************************************************************/
85
        // 010 SOMME(206, 207*)
86
        // Racine = "206-207"
87
        // S010=206+207
88
        long v010 = this.sommeCompte.soldeCompte(206, 207, true, this.dateDebut, this.dateFin);
89
        this.m.put("ACTIF1.0", GestionDevise.currencyToString(v010, false));
90
 
91
        // 012 -SOMME (2806,2807*) - SOMME(2906,2907*)
92
        // "2807, 2900, 2906-2907"
93
        // S012=-2807-2906-2907
94
        long v012 = -this.sommeCompte.sommeCompteFils("2807", this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(2906, 2907, true, this.dateDebut, this.dateFin);
95
        this.m.put("ACTIF2.0", GestionDevise.currencyToString(v012, false));
96
 
97
        // 011 010-012
98
        long v011 = v010 - v012;
99
        this.m.put("ACTIF3.0", GestionDevise.currencyToString(v011, false));
100
 
101
        // N-1 013 (N-1)010-(N-1)012
102
        this.m.put("ACTIF4.0", "");
103
 
104
        SwingUtilities.invokeLater(new Runnable() {
105
            public void run() {
106
                Map2033A.this.bar.setValue(10);
107
            }
108
        });
109
        /*******************************************************************************************
110
         * IMMO INCORPORELLES --> AUTRES
111
         ******************************************************************************************/
19 ilm 112
        // 014 SommeSolde(109) + SommeSolde( 200, 205* )+SommeSolde( 208, 209*
113
        // )+SommeSolde( 237,
18 ilm 114
        // 237* )
115
        // Racine = "109, 201, 203, 205, 208, 237"
116
        // S014=201...205+208+237+232
94 ilm 117
        // Fix Abaque 208 - 2087
142 ilm 118
        long v014 = this.sommeCompte.soldeCompteDebiteur(109, 109, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("201", this.dateDebut, this.dateFin)
18 ilm 119
                + this.sommeCompte.sommeCompteFils("203", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("232", this.dateDebut, this.dateFin)
94 ilm 120
                + this.sommeCompte.sommeCompteFils("205", this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(208, 208, true, this.dateDebut, this.dateFin)
121
                - this.sommeCompte.soldeCompte(2087, 2087, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("237", this.dateDebut, this.dateFin);
18 ilm 122
        this.m.put("ACTIF1.1", GestionDevise.currencyToString(v014, false));
123
 
124
        // 016 -SommeSolde( 280, 280* ) - SommeSolde(2905) - SommeSolde (2908)
125
        // RacineDap = "2800, 2801, 2803, 2805, 2808, 2908, 2905"
126
        // S016=-2801-2803-2805-2905-2808-2908-2932
80 ilm 127
        // remove 26/11/13 present en case "012" - this.sommeCompte.sommeCompteFils("2807",
128
        // this.dateDebut, this.dateFin)
18 ilm 129
        long v016 = -this.sommeCompte.sommeCompteFils("2801", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("2803", this.dateDebut, this.dateFin)
80 ilm 130
                - this.sommeCompte.sommeCompteFils("2805", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("2808", this.dateDebut, this.dateFin)
131
                - this.sommeCompte.sommeCompteFils("2905", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("2906", this.dateDebut, this.dateFin)
132
                - this.sommeCompte.sommeCompteFils("2907", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("2908", this.dateDebut, this.dateFin)
133
                - this.sommeCompte.sommeCompteFils("2932", this.dateDebut, this.dateFin);
18 ilm 134
 
135
        this.m.put("ACTIF2.1", GestionDevise.currencyToString(v016, false));
136
 
137
        // 015 014-016
138
        long v015 = v014 - v016;
139
        this.m.put("ACTIF3.1", GestionDevise.currencyToString(v015, false));
140
 
141
        // 017 014-016
142
        this.m.put("ACTIF4.1", "");
143
 
144
        /*******************************************************************************************
145
         * IMMO CORPORELLES
146
         ******************************************************************************************/
147
        // 028 SommeSolde( 210, 236* )+SommeSolde( 238, 259* )
148
        // Racine = "210-215, 218, 230-231, 238"
149
        // S028=211...215+218+22+231+238
150
        long v028 = this.sommeCompte.soldeCompte(211, 215, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("218", this.dateDebut, this.dateFin)
151
                + this.sommeCompte.sommeCompteFils("231", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("238", this.dateDebut, this.dateFin);
152
        this.m.put("ACTIF1.2", GestionDevise.currencyToString(v028, false));
153
 
154
        // 030 -SommeSolde( 281, 289* )-SommeSolde( 290, 295* )
155
        // RacineDap = "2810-2815, 2818, 2930-2931, 291"
156
        // S030=-2811-2812-2911-2813-2814-2815-2818-282-292-2931
83 ilm 157
        long v030 = -(this.sommeCompte.soldeCompte(2810, 2815, true, this.dateDebut, this.dateFin)) - this.sommeCompte.sommeCompteFils("2818", this.dateDebut, this.dateFin)
18 ilm 158
                - (this.sommeCompte.soldeCompte(2931, 2931, true, this.dateDebut, this.dateFin)) - this.sommeCompte.sommeCompteFils("2911", this.dateDebut, this.dateFin);
159
        this.m.put("ACTIF2.2", GestionDevise.currencyToString(v030, false));
160
 
161
        // 027 028-030
162
        long v027 = v028 - v030;
163
        this.m.put("ACTIF3.2", GestionDevise.currencyToString(v027, false));
164
 
165
        // 029 (N-1) 028-030
166
        this.m.put("ACTIF4.2", "");
167
 
168
        SwingUtilities.invokeLater(new Runnable() {
169
            public void run() {
170
                Map2033A.this.bar.setValue(20);
171
            }
172
        });
173
 
174
        /*******************************************************************************************
175
         * IMMO FINANCIERES
176
         ******************************************************************************************/
177
        // 040 SommeSolde( 260, 268* )+SommeSolde( 270, 278* )
19 ilm 178
        // Racine = "260D, 261, 266-268, 270-272, 274-275, 2760-2761, 27680,
179
        // 27682, 27684-27685,
18 ilm 180
        // 27688, 277"
181
        // S040=261+266...268+271+272+27682+274+27684+275+2761+27685+27688
182
        long v040 = this.sommeCompte.sommeCompteFils("261", this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(266, 268, true, this.dateDebut, this.dateFin)
183
                + this.sommeCompte.soldeCompte(271, 275, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(2761, 2761, true, this.dateDebut, this.dateFin)
184
                + this.sommeCompte.sommeCompteFils("27682", this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(27684, 27685, true, this.dateDebut, this.dateFin)
185
                + this.sommeCompte.sommeCompteFils("27688", this.dateDebut, this.dateFin);
186
 
187
        this.m.put("ACTIF1.3", GestionDevise.currencyToString(v040, false));
188
 
189
        // 042 -SommeSolde( 296, 299* )
190
        // RacineDap = "2960-2961, 2966-2968, 2970-2972, 2975-2976"
191
        // S042=-2961-2966-2967-2968-2971-2972-2974-2975-2976
192
        long v042 = -(this.sommeCompte.soldeCompte(2961, 2961, true, this.dateDebut, this.dateFin)) - (this.sommeCompte.soldeCompte(2966, 2968, true, this.dateDebut, this.dateFin))
193
                - (this.sommeCompte.soldeCompte(2971, 2976, true, this.dateDebut, this.dateFin));
194
        this.m.put("ACTIF2.3", GestionDevise.currencyToString(v042, false));
195
 
196
        // 041 040-042
197
        long v041 = v040 - v042;
198
        this.m.put("ACTIF3.3", GestionDevise.currencyToString(v041, false));
199
 
200
        // 043 40-042
201
        this.m.put("ACTIF4.3", "");
202
 
203
        SwingUtilities.invokeLater(new Runnable() {
204
            public void run() {
205
                Map2033A.this.bar.setValue(30);
206
            }
207
        });
208
        /*******************************************************************************************
209
         * TOTAL I
210
         ******************************************************************************************/
211
        // 044 010+014+028+040
212
        // S044:=S010+S014+S028+S040
213
        long v044 = v010 + v014 + v028 + v040;
214
        this.m.put("ACTIF1.4", GestionDevise.currencyToString(v044, false));
215
 
216
        // 048 012+016+030+042
217
        // S048:=S012+S016+S030+S042
218
        long v048 = v012 + v016 + v030 + v042;
219
        this.m.put("ACTIF2.4", GestionDevise.currencyToString(v048, false));
220
 
221
        // 045 011+015+027+041
222
        long v045 = v011 + v015 + v027 + v041;
223
        this.m.put("ACTIF3.4", GestionDevise.currencyToString(v045, false));
224
 
225
        // 049
226
        this.m.put("ACTIF4.4", "");
227
 
228
        SwingUtilities.invokeLater(new Runnable() {
229
            public void run() {
230
                Map2033A.this.bar.setValue(40);
231
            }
232
        });
233
        /*******************************************************************************************
234
         * STOCK --> MATIERE PREMIERE
235
         ******************************************************************************************/
236
        // 050 SommeSolde( 30, 36* )
237
        // Racine = "31-36, 38"
238
        // S050=31...36
94 ilm 239
        long v050 = this.sommeCompte.soldeCompte(30, 35, true, this.dateDebut, this.dateFin);
18 ilm 240
        this.m.put("ACTIF1.5", GestionDevise.currencyToString(v050, false));
241
 
242
        // 052 -SommeSolde( 390, 396*)
243
        // RacineDap = "390-395"
244
        // S052=-391...396
245
        long v052 = -(this.sommeCompte.soldeCompte(391, 395, true, this.dateDebut, this.dateFin));
246
        this.m.put("ACTIF2.5", GestionDevise.currencyToString(v052, false));
247
 
248
        // 051 050-052
249
        long v051 = v050 - v052;
250
        this.m.put("ACTIF3.5", GestionDevise.currencyToString(v051, false));
251
 
252
        // 053
253
        this.m.put("ACTIF4.5", "");
254
 
255
        /*******************************************************************************************
256
         * STOCK --> MARCHANDISE
257
         ******************************************************************************************/
258
        // 060 SommeSolde( 37, 38* )
259
        // Racine = "37"
260
        // S060=37
261
        long v060 = this.sommeCompte.soldeCompte(37, 37, true, this.dateDebut, this.dateFin);
262
        this.m.put("ACTIF1.6", GestionDevise.currencyToString(v060, false));
263
 
264
        // 062 -SommeSolde( 397, 399* )
265
        // RacineDap = "397"
266
        // S062=-397
267
        long v062 = -(this.sommeCompte.soldeCompte(397, 397, true, this.dateDebut, this.dateFin));
268
        this.m.put("ACTIF2.6", GestionDevise.currencyToString(v062, false));
269
 
270
        // 061 060-062
271
        long v061 = v060 - v062;
272
        this.m.put("ACTIF3.6", GestionDevise.currencyToString(v061, false));
273
 
274
        // 063 060 - 062
275
        this.m.put("ACTIF4.6", "");
276
 
277
        /*******************************************************************************************
278
         * Avances et acomptes
279
         ******************************************************************************************/
280
        // 064 SommeSolde( 4090, 4095* )
281
        // Racine = "4091"
282
        // S064=4091
283
        long v064 = this.sommeCompte.soldeCompte(4091, 4091, true, this.dateDebut, this.dateFin);
284
        this.m.put("ACTIF1.7", GestionDevise.currencyToString(v064, false));
285
 
286
        // 066
287
        long v066 = 0;
288
        this.m.put("ACTIF2.7", "");
289
 
290
        // 065
83 ilm 291
        long v065 = v064;
18 ilm 292
        this.m.put("ACTIF3.7", GestionDevise.currencyToString(v064, false));
293
 
294
        // 067
295
        long v067 = 0;
296
        this.m.put("ACTIF4.7", "");
297
 
298
        SwingUtilities.invokeLater(new Runnable() {
299
            public void run() {
300
                Map2033A.this.bar.setValue(50);
301
            }
302
        });
303
        /*******************************************************************************************
304
         * CREANCES ---> Clients
305
         ******************************************************************************************/
306
        // 068 SommeSoldeDebit( 410, 418* )
307
        // Racine = "410-411, 413, 416-418"
308
        // S068=41(D)...411+41A(D)...41Z+413(D)+416(D)...418
144 ilm 309
        long v068 = this.sommeCompte.soldeCompteDebiteur(410, 411, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("413", this.dateDebut, this.dateFin)
18 ilm 310
                + this.sommeCompte.soldeCompteDebiteur(416, 418, true, this.dateDebut, this.dateFin);
311
        this.m.put("ACTIF1.8", GestionDevise.currencyToString(v068, false));
312
 
313
        // 070 -SommeSolde(490, 494*)
314
        // RacineDap = "490, 491"
315
        // S070=-491
316
        long v070 = -this.sommeCompte.soldeCompte(491, 491, true, this.dateDebut, this.dateFin);
317
        this.m.put("ACTIF2.8", GestionDevise.currencyToString(v070, false));
318
 
319
        // 069
320
        long v069 = v068 - v070;
321
        this.m.put("ACTIF3.8", GestionDevise.currencyToString(v069, false));
322
 
323
        // 071
324
        this.m.put("ACTIF4.8", "");
325
 
326
        /*******************************************************************************************
327
         * CREANCES ---> AUTRES
328
         ******************************************************************************************/
19 ilm 329
        // 072 SommeSoldeDebit( 400, 408* )+SommeSolde(4096, 4099*)+SommeSolde(
330
        // 425, 425* )
331
        // +SommeSolde( 4287, 4299* )+SommeSoldeDebit(430,
332
        // 453*)+SommeSoldeDebit( 455, 459* )
333
        // +SommeSolde( 460, 463* )+SommeSolde( 465, 466* )+SommeSoldeDebit(
334
        // 467, 467* )
335
        // +SommeSolde( 4687, 4699* )+SommeSoldeDebit( 470, 476*
336
        // )+SommeSoldeDebit( 478, 479* )
18 ilm 337
        // +SommeSolde( 480, 485* )
338
        // Racine = "4090, 4096-4098, 420d, 425, 4280d, 4287,
339
        // 430d, 4380d, 4387, 440d, 441, 443d-444d, 4450d, 4456, 44580d,
19 ilm 340
        // 44581-44583, 44586, 4480d, 4487, 450d, 451d, 455d, 4560d-4564d,
341
        // 4566d-4567d, 458d, 462,
18 ilm 342
        // 465, 467d, 4680d, 4687, 471d-475d, 478d"
343
        // S072=4096(D)+4097(D)+4098(D)+40(D)...401+40A(D)...40Z+42(D)..47
83 ilm 344
        long v072 = this.sommeCompte.soldeCompteDebiteur(4455, 4455, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteDebiteur(421, 421, true, this.dateDebut, this.dateFin)
345
                + this.sommeCompte.soldeCompteDebiteur(400, 408, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(4096, 4098, true, this.dateDebut, this.dateFin)
18 ilm 346
                + this.sommeCompte.sommeCompteFils("425", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("4287", this.dateDebut, this.dateFin)
151 ilm 347
                + this.sommeCompte.soldeCompteDebiteur(43, 43, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("441", this.dateDebut, this.dateFin)
348
                + this.sommeCompte.soldeCompteDebiteur(443, 445, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("4487", this.dateDebut, this.dateFin)
18 ilm 349
                + this.sommeCompte.soldeCompteDebiteur(451, 451, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteDebiteur(455, 455, true, this.dateDebut, this.dateFin)
350
                + this.sommeCompte.soldeCompteDebiteur(4560, 4561, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteDebiteur(4563, 4569, true, this.dateDebut, this.dateFin)
151 ilm 351
                + this.sommeCompte.soldeCompteDebiteur(458, 458, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteDebiteur(46, 46, true, this.dateDebut, this.dateFin)
352
                + this.sommeCompte.soldeCompteDebiteur(478, 478, true, this.dateDebut, this.dateFin);
18 ilm 353
        this.m.put("ACTIF1.9", GestionDevise.currencyToString(v072, false));
354
 
355
        // 074 -SommeSolde( 495, 499 )
356
        // RacineDap = "495-496"
357
        // S074=-495(D)-496(D)
358
        long v074 = -(this.sommeCompte.soldeCompte(495, 496, true, this.dateDebut, this.dateFin));
359
        this.m.put("ACTIF2.9", GestionDevise.currencyToString(v074, false));
360
 
361
        // 073
362
        long v073 = v072 - v074;
363
        this.m.put("ACTIF3.9", GestionDevise.currencyToString(v073, false));
364
 
365
        // 075
366
        this.m.put("ACTIF4.9", "");
367
 
368
        /*******************************************************************************************
369
         * VALEURS IMMOBILIERES
370
         ******************************************************************************************/
371
        // 080 SommeSolde( 500, 508* )
372
        // Racine = "500d, 501-508"
373
        // S080=50...508
374
        long v080 = this.sommeCompte.soldeCompte(500, 508, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(52, 52, true, this.dateDebut, this.dateFin);
375
        this.m.put("ACTIF1.10", GestionDevise.currencyToString(v080, false));
376
 
377
        // 082 -SommeSolde( 59, 59* )
378
        // RacineDap = "59"
379
        // S082=-59
380
        long v082 = -this.sommeCompte.sommeCompteFils("59", this.dateDebut, this.dateFin);
381
        this.m.put("ACTIF2.10", GestionDevise.currencyToString(v082, false));
382
 
383
        // 081
384
        long v081 = v080 - v082;
385
        this.m.put("ACTIF3.10", GestionDevise.currencyToString(v081, false));
386
 
387
        // 083
388
        this.m.put("ACTIF4.10", "");
389
 
390
        /*******************************************************************************************
391
         * DISPONIBILITE
392
         ******************************************************************************************/
393
        // 084 SommeSolde( 510, 511* )+SommeSoldeDebit( 512, 514* )
394
        // + SommeSolde( 52, 58* )
19 ilm 395
        // +SommeSolde( 515, 516* )+SommeSoldeDebit( 517, 517* )+SommeSolde(
396
        // 5187, 5189* )
18 ilm 397
        // Racine = "510d-512d, 514d-517d, 5180d, 5187, 54"
398
        // 'Caisse
399
        // Racine = "53"
400
        // S084=511+512(D)...517+5187+54+58(D)+53
401
        long v084 = this.sommeCompte.soldeCompteDebiteur(510, 517, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteDebiteur(5180, 5185, true, this.dateDebut, this.dateFin)
402
                + this.sommeCompte.soldeCompteDebiteur(5187, 5189, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("54", this.dateDebut, this.dateFin)
83 ilm 403
                + this.sommeCompte.sommeCompteFils("53", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("58", this.dateDebut, this.dateFin);
18 ilm 404
 
405
        this.m.put("ACTIF1.11", GestionDevise.currencyToString(v084, false));
406
 
407
        // 086
408
        this.m.put("ACTIF2.11", "");
409
 
410
        // 085
411
        long v085 = v084;
412
        this.m.put("ACTIF3.11", GestionDevise.currencyToString(v085, false));
413
 
414
        // 087
415
        this.m.put("ACTIF4.11", "");
416
 
417
        SwingUtilities.invokeLater(new Runnable() {
418
            public void run() {
419
                Map2033A.this.bar.setValue(60);
420
            }
421
        });
422
 
423
        /*******************************************************************************************
424
         * CHARGES CONSTATEES D'AVANCE
425
         ******************************************************************************************/
426
        // 092 SommeSolde( 486, 486* )
427
        // Racine = "169, 470d, 476, 480d, 481, 486"
428
        // S092=486
429
        // long v092 = this.sommeCompte.sommeCompteFils("486") +
430
        // this.sommeCompte.sommeCompteFils("481") +
19 ilm 431
        // this.sommeCompte.sommeCompteFils("476") +
432
        // this.sommeCompte.sommeCompteFils("169")
18 ilm 433
        // + this.sommeCompte.soldeCompteDebiteur(470, 470, true) +
434
        // this.sommeCompte.soldeCompteDebiteur(480,
435
        // 480, true);
436
        long v092 = this.sommeCompte.sommeCompteFils("486", this.dateDebut, this.dateFin);
437
        this.m.put("ACTIF1.12", GestionDevise.currencyToString(v092, false));
438
 
439
        // 094
440
        long v094 = 0;
441
        this.m.put("ACTIF2.12", "");
442
 
443
        // 093
444
        long v093 = v092 - v094;
445
        this.m.put("ACTIF3.12", GestionDevise.currencyToString(v093, false));
446
 
447
        // 095
448
        this.m.put("ACTIF4.12", "");
449
 
450
        /*******************************************************************************************
451
         * TOTAL II
452
         ******************************************************************************************/
453
        // 096 050+060+064+068+072+080+084+092
454
        long v096 = v050 + v060 + v064 + v068 + v072 + v080 + v084 + v092;
455
        this.m.put("ACTIF1.13", GestionDevise.currencyToString(v096, false));
456
 
457
        // 098 052+062+066+070+074+082+086+094
458
        long v098 = v052 + v062 + v070 + v074 + v082 + v094;
459
        this.m.put("ACTIF2.13", GestionDevise.currencyToString(v098, false));
460
 
461
        // 097 051+061+065+069+073+081+085+093
83 ilm 462
        long v097 = v051 + v061 + +v065 + v069 + v073 + v081 + v085 + v093;
18 ilm 463
        this.m.put("ACTIF3.13", GestionDevise.currencyToString(v097, false));
464
 
465
        // 099
466
        this.m.put("ACTIF4.13", "");
467
 
468
        /*******************************************************************************************
469
         * TOTAL GENERAL
470
         ******************************************************************************************/
471
        // 110 044+096
472
        long v110 = v044 + v096;
473
        this.m.put("ACTIF1.14", GestionDevise.currencyToString(v110, false));
474
 
475
        // 112
476
        long v112 = v048 + v098;
477
        this.m.put("ACTIF2.14", GestionDevise.currencyToString(v112, false));
478
 
479
        // 111
480
        long v111 = v045 + v097;
481
        this.m.put("ACTIF3.14", GestionDevise.currencyToString(v111, false));
482
 
483
        // 113
484
        this.m.put("ACTIF4.14", "");
485
 
486
        SwingUtilities.invokeLater(new Runnable() {
487
            public void run() {
488
                Map2033A.this.bar.setValue(70);
489
            }
490
        });
491
        /*******************************************************************************************
492
         * PASSIF
493
         ******************************************************************************************/
494
 
495
        /*******************************************************************************************
496
         * CAPITAL SOCIAL
497
         ******************************************************************************************/
498
 
499
        // 120 -SommeSolde( 100, 103* )-SommeSolde( 108, 109* )
500
        // Racine = "101, 104, 108"
501
        // S120=-10...101-108-104
142 ilm 502
        long v120 = -this.sommeCompte.sommeCompteFils("101", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("103", this.dateDebut, this.dateFin)
503
                - this.sommeCompte.sommeCompteFils("108", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("104", this.dateDebut, this.dateFin)
504
                + this.sommeCompte.soldeCompteCrediteur(109, 109, true, this.dateDebut, this.dateFin);
18 ilm 505
        this.m.put("PASSIF3.15", GestionDevise.currencyToString(v120, false));
506
 
507
        // 121
508
        this.m.put("PASSIF4.15", "");
509
 
510
        /*******************************************************************************************
511
         * ECARTS DE REEVAL
512
         ******************************************************************************************/
513
        // 124 -SommeSolde( 105, 105* )
514
        // Racine = "105"
515
        // S124=-105
516
        long v124 = -this.sommeCompte.sommeCompteFils("105", this.dateDebut, this.dateFin);
517
        this.m.put("PASSIF3.16", GestionDevise.currencyToString(v124, false));
518
 
519
        // 125
520
        this.m.put("PASSIF4.16", "");
521
 
522
        /*******************************************************************************************
523
         * RESERVE LEGALE
524
         ******************************************************************************************/
525
        // 126 -SommeSolde( 1060, 1061* )
526
        // Racine = "1061"
527
        // S126=-1061
528
        long v126 = -(this.sommeCompte.soldeCompte(1061, 1061, true, this.dateDebut, this.dateFin));
529
        this.m.put("PASSIF3.17", GestionDevise.currencyToString(v126, false));
530
 
531
        // 127
532
        this.m.put("PASSIF4.17", "");
533
 
534
        /*******************************************************************************************
535
         * RESERVE REGLEMENTEES
536
         ******************************************************************************************/
537
        // 129
538
        // 130 -SommeSolde( 1062 )-SommeSolde( 1064, 1067 )
539
        // Racine = "1062, 1064"
540
        // S130=-1063-1062-1064
541
        long v130 = -this.sommeCompte.soldeCompte(1062, 1062, true, this.dateDebut, this.dateFin) - (this.sommeCompte.soldeCompte(1064, 1064, true, this.dateDebut, this.dateFin));
542
        this.m.put("PASSIF3.18", GestionDevise.currencyToString(v130, false));
543
 
544
        // 128 N-1: +R130
545
        this.m.put("PASSIF4.18", "");
546
 
547
        /*******************************************************************************************
548
         * AUTRES RESERVES
549
         ******************************************************************************************/
550
        // 131
19 ilm 551
        // 132 -SommeSolde( 104, 104* )-SommeSolde( 1063, 1063* )-SommeSolde(
552
        // 1068, 1079* )
18 ilm 553
        // Racine = "1060, 1063, 1068"
554
        // S132=-1068
555
        long v132 = -this.sommeCompte.sommeCompteFils("1063", this.dateDebut, this.dateFin) - (this.sommeCompte.soldeCompte(1068, 1068, true, this.dateDebut, this.dateFin));
556
        this.m.put("PASSIF3.19", GestionDevise.currencyToString(v132, false));
557
 
558
        // 133 N-1: +R132
559
        this.m.put("PASSIF4.19", "");
560
 
561
        /*******************************************************************************************
562
         * REPORT A NOUVEAUX
563
         ******************************************************************************************/
564
        // 134 -SommeSolde( 11, 11* )
565
        // Racine = "11"
566
        // S134=-11
567
        long v134 = -this.sommeCompte.sommeCompteFils("11", this.dateDebut, this.dateFin);
568
        this.m.put("PASSIF3.20", GestionDevise.currencyToString(v134, false));
569
 
570
        // 135 -N-1: +R134
571
        this.m.put("PASSIF4.20", "");
572
 
573
        /*******************************************************************************************
574
         * RESULTAT DE L'EXCERCICE
575
         ******************************************************************************************/
576
        // 136 -SommeSolde( 7 )-SommeSolde( 6 )
577
        // Racine = "12, 6"
578
        // S136=-6-7
579
        // Racine1 = "7"
19 ilm 580
        // long v136 = -this.sommeCompte.sommeCompteFils("12", dateDebut,
581
        // dateFin);
18 ilm 582
        long v136 = -this.sommeCompte.sommeCompteFils("7", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("6", this.dateDebut, this.dateFin);
583
        this.m.put("PASSIF3.21", GestionDevise.currencyToString(v136, false));
584
 
585
        // 137 -N-1: +R136
586
        this.m.put("PASSIF4.21", "");
587
 
588
        /*******************************************************************************************
589
         * PROVISIONS REGLEMENTEES
590
         ******************************************************************************************/
591
        // 140 -SommeSolde( 13, 14* )
592
        // Racine = "13, 14"
593
        // S140=-13-14
594
        long v140 = -this.sommeCompte.soldeCompte(13, 14, true, this.dateDebut, this.dateFin);
595
        this.m.put("PASSIF3.22", GestionDevise.currencyToString(v140, false));
596
 
597
        // 138 -N-1: +R140
598
        this.m.put("PASSIF4.22", "");
599
 
600
        /*******************************************************************************************
601
         * TOTAL I
602
         ******************************************************************************************/
603
        // 142 R120+R124+R126+R130+R132+R134+R136+R140
604
        long v142 = v120 + v124 + v126 + v130 + v132 + v134 + v136 + v140;
605
        this.m.put("PASSIF3.23", GestionDevise.currencyToString(v142, false));
606
 
607
        // 141
608
        this.m.put("PASSIF4.23", "");
609
 
610
        /*******************************************************************************************
611
         * PROVISIONS POUR RISQUE ET CHARGE (TOTAL II)
612
         ******************************************************************************************/
613
        // 154 -SommeSolde( 15, 15* )
614
        // Racine = "150-151, 153, 155-158"
615
        // S154:=-151-153-155...158
616
        long v154 = -this.sommeCompte.sommeCompteFils("15", this.dateDebut, this.dateFin);
617
        this.m.put("PASSIF3.24", GestionDevise.currencyToString(v154, false));
618
 
619
        // 150
620
        this.m.put("PASSIF4.24", "");
621
 
622
        SwingUtilities.invokeLater(new Runnable() {
623
            public void run() {
624
                Map2033A.this.bar.setValue(80);
625
            }
626
        });
627
 
628
        /*******************************************************************************************
629
         * EMPRUNTS ET DETTES ASSIMILEES
630
         ******************************************************************************************/
19 ilm 631
        // 156 -SommeSolde( 160, 199 )+SommeSoldeCredit( 512, 514
632
        // )+SommeSoldeCredit( 517
18 ilm 633
        // )-SommeSolde( 5180, 5186 )-SommeSolde( 519 )
19 ilm 634
        // Racine = "160-161, 163-167, 1680-1681, 1685, 1687, 16880-16881,
635
        // 16883-16888, 17, 260c
636
        // 269, 279, 404-405, 4084, 420c, 421-422, 424, 426-427, 4280c, 4282,
637
        // 4284, 4286, 430c,
638
        // 431, 437, 4380c, 4386, 440c, 442, 443c-444c, 4450c, 4455,4457,
639
        // 44580c, 44584, 44587,
640
        // 446-447, 4480c, 4486, 450c-451c, 456c, 458c, 519, 510c-512c,
641
        // 514c-517c, 5180c, 5186"
18 ilm 642
        // S156=-161-163-164-169-512(C)-514(C)-517(C)-5186-519-58(C)-165-166...168+16881+16883-17-426
643
        /*
644
         * float v156 = -this.sommeCompte.soldeCompte(160, 161, true) -
73 ilm 645
         * this.sommeCompte.soldeCompte(163, 167, true) - this.sommeCompte.soldeCompte(1680, 1681,
646
         * true) - this.sommeCompte.sommeCompteFils("1685") -
647
         * this.sommeCompte.sommeCompteFils("1687") - this.sommeCompte.soldeCompte(16880, 16881,
648
         * true) - this.sommeCompte.soldeCompte(16883, 16888, true) -
649
         * this.sommeCompte.sommeCompteFils("17") + this.sommeCompte.soldeCompteCrediteur(260, 260,
650
         * true) - this.sommeCompte.sommeCompteFils("269") - this.sommeCompte.sommeCompteFils("279")
651
         * - this.sommeCompte.soldeCompte(404, 405, true) - this.sommeCompte.sommeCompteFils("4084")
652
         * + this.sommeCompte.soldeCompteCrediteur(420, 420, true) -
653
         * this.sommeCompte.soldeCompte(421, 422, true) - this.sommeCompte.sommeCompteFils("424") -
18 ilm 654
         * this.sommeCompte.soldeCompte(426, 427, true) +
655
         * this.sommeCompte.soldeCompteCrediteur(4280, 4280, true) -
73 ilm 656
         * this.sommeCompte.sommeCompteFils("4282") - this.sommeCompte.sommeCompteFils("4284") -
657
         * this.sommeCompte.sommeCompteFils("4286") + this.sommeCompte.soldeCompteCrediteur(430,
658
         * 430, true) - this.sommeCompte.sommeCompteFils("431") -
659
         * this.sommeCompte.sommeCompteFils("437") + this.sommeCompte.soldeCompteCrediteur(4380,
660
         * 4380, true) - this.sommeCompte.sommeCompteFils("4386") +
18 ilm 661
         * this.sommeCompte.soldeCompteCrediteur(440, 440, true) -
73 ilm 662
         * this.sommeCompte.sommeCompteFils("442") + this.sommeCompte.soldeCompteCrediteur(443, 444,
663
         * true) + this.sommeCompte.soldeCompteCrediteur(4450, 4450, true) -
664
         * this.sommeCompte.sommeCompteFils("4455") - this.sommeCompte.sommeCompteFils("4457") +
18 ilm 665
         * this.sommeCompte.soldeCompteCrediteur(44580, 44580, true) -
73 ilm 666
         * this.sommeCompte.sommeCompteFils("44584") - this.sommeCompte.sommeCompteFils("44587") -
18 ilm 667
         * this.sommeCompte.soldeCompte(446, 447, true) +
668
         * this.sommeCompte.soldeCompteCrediteur(4480, 4480, true) -
73 ilm 669
         * this.sommeCompte.sommeCompteFils("4486") + this.sommeCompte.soldeCompteCrediteur(450,
670
         * 451, true) + this.sommeCompte.soldeCompteCrediteur(456, 456, true) +
18 ilm 671
         * this.sommeCompte.soldeCompteCrediteur(458, 458, true) -
73 ilm 672
         * this.sommeCompte.sommeCompteFils("519") + this.sommeCompte.soldeCompteCrediteur(510, 512,
673
         * true) + this.sommeCompte.soldeCompteCrediteur(514, 517, true) +
18 ilm 674
         * this.sommeCompte.soldeCompteCrediteur(5180, 5180, true) -
675
         * this.sommeCompte.sommeCompteFils("5186") ;
676
         */
677
        long v156 = -this.sommeCompte.sommeCompteFils("161", this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(163, 166, true, this.dateDebut, this.dateFin)
83 ilm 678
                - this.sommeCompte.soldeCompte(1680, 1681, true, this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(1682, 1682, true, this.dateDebut, this.dateFin)
18 ilm 679
                - this.sommeCompte.soldeCompte(1684, 1689, true, this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("17", this.dateDebut, this.dateFin)
83 ilm 680
                - this.sommeCompte.sommeCompteFils("426", this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(450, 454, true, this.dateDebut, this.dateFin)
681
                + this.sommeCompte.soldeCompteCrediteur(456, 456, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(458, 459, true, this.dateDebut, this.dateFin)
144 ilm 682
                + this.sommeCompte.soldeCompteCrediteur(512, 517, true, this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("518", this.dateDebut, this.dateFin)
83 ilm 683
                - this.sommeCompte.sommeCompteFils("519", this.dateDebut, this.dateFin);
18 ilm 684
        this.m.put("PASSIF3.25", GestionDevise.currencyToString(v156, false));
685
 
686
        // 151
687
        this.m.put("PASSIF4.25", "");
688
 
689
        /*******************************************************************************************
690
         * AVANCES ET ACOMPTE RECUS
691
         ******************************************************************************************/
692
        // 164 -SommeSolde( 4190, 4195* )
693
        // Racine = "4191"
694
        // S164=-4191
144 ilm 695
        long v164 = -this.sommeCompte.soldeCompte(4191, 4191, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(510, 511, true, this.dateDebut, this.dateFin);
18 ilm 696
        this.m.put("PASSIF3.26", GestionDevise.currencyToString(v164, false));
697
 
698
        // 152
699
        this.m.put("PASSIF4.26", "");
700
 
701
        /*******************************************************************************************
702
         * FOURNISSEURS ET COMPTES RATTACHES
703
         ******************************************************************************************/
19 ilm 704
        // 166 SommeSoldeCredit( 400, 403 )+SommeSoldeCredit( 408
705
        // )-SommeSoldeCredit( 4084, 4087 )
18 ilm 706
        // Racine = "400-401, 403, 4080-4081, 4088"
707
        // S166=-40(C)...405-40A(C)...40Z-403-4081-4084-4088
708
        long v166 = this.sommeCompte.soldeCompteCrediteur(403, 403, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(401, 401, true, this.dateDebut, this.dateFin)
151 ilm 709
                + this.sommeCompte.soldeCompteCrediteur(408, 408, true, this.dateDebut, this.dateFin);
18 ilm 710
        // float v166 = this.sommeCompte.soldeCompteCrediteur(400, 401, true) -
19 ilm 711
        // this.sommeCompte.sommeCompteFils("403") +
712
        // this.sommeCompte.soldeCompte(4080, 4081, false)
18 ilm 713
        // +
714
        // this.sommeCompte.sommeCompteFils("4088");
715
        this.m.put("PASSIF3.27", GestionDevise.currencyToString(v166, false));
716
 
717
        // 153
718
        this.m.put("PASSIF4.27", "");
719
 
720
        /*******************************************************************************************
721
         * AUTRES DETTES
722
         ******************************************************************************************/
723
        // S169=-455
724
        long v169 = -this.sommeCompte.sommeCompteFils("455", this.dateDebut, this.dateFin);
725
        this.m.put("PASSIF2.28", GestionDevise.currencyToString(v169, false));
726
 
19 ilm 727
        // 172 -SommeSolde( 269 )-SommeSolde( 279 )+SommeSoldeCredit( 404, 407
728
        // )+SommeSoldeCredit(
18 ilm 729
        // 4084, 4087 )
19 ilm 730
        // +SommeSoldeCredit( 410, 418 )-SommeSolde( 4196, 4199 )-SommeSolde(
731
        // 420, 424 )
732
        // -SommeSolde( 4260, 4286 )+SommeSoldeCredit( 430, 449
733
        // )+SommeSoldeCredit( 450, 453 )
734
        // -SommeSolde( 454 )+SommeSoldeCredit( 455, 457 )+SommeSoldeCredit(
735
        // 458, 459 )-SommeSolde(
18 ilm 736
        // 464 )
19 ilm 737
        // +SommeSoldeCredit( 467 )-SommeSolde( 4680, 4686 )+SommeSoldeCredit(
738
        // 470, 476
18 ilm 739
        // )-SommeSolde( 477 )
740
        // +SommeSoldeCredit( 478, 479 )-SommeSolde( 509 )
741
        // Racine = "4190, 4196-4198, 455c, 457, 460c, 464, 467c, 4680c, 4686,
742
        // 471c-475c, 478c, 500c, 509"
743
        /*
744
         * float v172 = -this.sommeCompte.sommeCompteFils("4190") -
745
         * this.sommeCompte.soldeCompte(4196, 4198, true) +
746
         * this.sommeCompte.soldeCompteCrediteur(455, 455, true) -
73 ilm 747
         * this.sommeCompte.sommeCompteFils("457") + this.sommeCompte.soldeCompteCrediteur(460, 460,
748
         * true) - this.sommeCompte.sommeCompteFils("464") +
18 ilm 749
         * this.sommeCompte.soldeCompteCrediteur(467, 467, true) +
750
         * this.sommeCompte.soldeCompteCrediteur(4680, 4680, true) -
73 ilm 751
         * this.sommeCompte.sommeCompteFils("4686") + this.sommeCompte.soldeCompteCrediteur(471,
752
         * 475, true) + this.sommeCompte.soldeCompteCrediteur(478, 478, true) +
18 ilm 753
         * this.sommeCompte.soldeCompteCrediteur(500, 500, true) -
754
         * this.sommeCompte.sommeCompteFils("509");
755
         */
756
        /*
73 ilm 757
         * S172=-421(C) -422(C) -424(C) -427(C) -4282(C) -4284(C) -4286(C) -43(C) +4387(C) -442(C)
758
         * -443(C) -451(C)...455 // -4563 -4564 -4567 -457 -458(C) -444(C) -4451(C) -4455(C)
759
         * -4456(C) -4457(C) +44581 +44582 -44584(C) -44587(C) -446(C) -447(C) -448(C)...4482
760
         * -4486(C) -269 -279 -41(C)...411 -41A(C)...41Z -4196 -4197 -4198 -464 -467(C) -4686(C)
761
         * -47(C)...475 -478(C) -509
18 ilm 762
         */
763
        /*
764
         * float v172 = -this.sommeCompte.sommeCompteFils("269") -
73 ilm 765
         * this.sommeCompte.sommeCompteFils("279") - this.sommeCompte.soldeCompteCrediteur(404, 407,
766
         * false) - this.sommeCompte.soldeCompteCrediteur(4084, 4087, false) -
18 ilm 767
         * this.sommeCompte.soldeCompteCrediteur(410, 418, false) -
73 ilm 768
         * this.sommeCompte.soldeCompte(4196, 4199, false) - this.sommeCompte.soldeCompte(420, 424,
769
         * false) - this.sommeCompte.soldeCompte(4260, 4286, false) -
18 ilm 770
         * this.sommeCompte.soldeCompteCrediteur(430, 449, false) -
771
         * this.sommeCompte.soldeCompteCrediteur(450, 453, false) -
73 ilm 772
         * this.sommeCompte.sommeCompteFils("454") - this.sommeCompte.soldeCompteCrediteur(455, 457,
773
         * false) - this.sommeCompte.soldeCompteCrediteur(458, 459, false) -
774
         * this.sommeCompte.sommeCompteFils("464") - this.sommeCompte.sommeCompteFils("467") -
18 ilm 775
         * this.sommeCompte.soldeCompte(4680, 4686, false) -
776
         * this.sommeCompte.soldeCompteCrediteur(470, 476, false) -
73 ilm 777
         * this.sommeCompte.sommeCompteFils("477") - this.sommeCompte.soldeCompteCrediteur(478, 479,
778
         * false) - this.sommeCompte.sommeCompteFils("509");
18 ilm 779
         */
780
 
144 ilm 781
        long v172 = this.sommeCompte.soldeCompteCrediteur(410, 411, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(421, 421, true, this.dateDebut, this.dateFin)
18 ilm 782
                + this.sommeCompte.soldeCompteCrediteur(422, 422, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(424, 424, true, this.dateDebut, this.dateFin)
783
                + this.sommeCompte.soldeCompteCrediteur(427, 427, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(4282, 4282, true, this.dateDebut, this.dateFin)
784
                + this.sommeCompte.soldeCompteCrediteur(4284, 4284, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(4286, 4286, true, this.dateDebut, this.dateFin)
151 ilm 785
                + this.sommeCompte.soldeCompteCrediteur(43, 43, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(442, 442, true, this.dateDebut, this.dateFin)
786
                + this.sommeCompte.soldeCompteCrediteur(443, 445, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(455, 455, true, this.dateDebut, this.dateFin)
787
                - this.sommeCompte.soldeCompte(446, 447, true, this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(4482, 4482, true, this.dateDebut, this.dateFin)
788
                - this.sommeCompte.soldeCompte(4486, 4486, true, this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(457, 457, true, this.dateDebut, this.dateFin)
789
                - this.sommeCompte.soldeCompte(269, 269, true, this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(279, 279, true, this.dateDebut, this.dateFin)
790
                - this.sommeCompte.soldeCompte(404, 405, true, this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(4196, 4198, true, this.dateDebut, this.dateFin)
791
                + this.sommeCompte.soldeCompteCrediteur(46, 46, true, this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompteCrediteur(478, 478, true, this.dateDebut, this.dateFin)
18 ilm 792
                - this.sommeCompte.soldeCompte(509, 509, true, this.dateDebut, this.dateFin);
793
 
794
        this.m.put("PASSIF3.28", GestionDevise.currencyToString(v172, false));
795
 
796
        // 157
797
        this.m.put("PASSIF4.28", "");
798
 
799
        /*******************************************************************************************
800
         * PRODUITS CONSTATES D'AVANCE
801
         ******************************************************************************************/
802
        // 174 -SommeSolde( 487, 489 )
803
        // Racine = "470c, 477, 480c, 487"
804
        // S174=-487
805
        long v174 = -this.sommeCompte.soldeCompte(487, 487, false, this.dateDebut, this.dateFin);
806
        this.m.put("PASSIF3.29", GestionDevise.currencyToString(v174, false));
807
 
808
        // 158
809
        this.m.put("PASSIF4.29", "");
810
 
811
        /*******************************************************************************************
812
         * TOTAL III
813
         ******************************************************************************************/
814
        // 176 R156+R164+R166+R172+R174
815
        long v176 = v156 + v164 + v166 + v172 + v174;
816
        this.m.put("PASSIF3.30", GestionDevise.currencyToString(v176, false));
817
 
818
        // 160
819
        this.m.put("PASSIF4.30", "");
820
 
821
        /*******************************************************************************************
822
         * TOTAL
823
         ******************************************************************************************/
824
        // 180 R142+R154+R176
825
        long v180 = v142 + v154 + v176;
826
        this.m.put("PASSIF3.31", GestionDevise.currencyToString(v180, false));
827
 
828
        // 161
829
        this.m.put("PASSIF4.31", "");
830
        SwingUtilities.invokeLater(new Runnable() {
831
            public void run() {
832
                Map2033A.this.bar.setValue(90);
833
            }
834
        });
835
 
836
        /*******************************************************************************************
837
         * VALEURS NON CONNUES
838
         ******************************************************************************************/
839
 
840
        this.m.put("PASSIF2.18", "");
841
        this.m.put("PASSIF2.19", "");
842
        this.m.put("PASSIF1.32", "");
843
        this.m.put("PASSIF1.33", "");
844
        this.m.put("PASSIF1.34", "");
845
 
846
        this.m.put("PASSIF4.32", "");
847
        this.m.put("PASSIF4.33", "");
848
        this.m.put("PASSIF4.34", "");
83 ilm 849
 
18 ilm 850
        p.generateFrom(this.m);
851
 
852
        SwingUtilities.invokeLater(new Runnable() {
853
            public void run() {
854
                Map2033A.this.bar.setValue(95);
855
            }
856
        });
857
 
858
        SwingUtilities.invokeLater(new Runnable() {
859
            public void run() {
156 ilm 860
                Gestion.openPDF(p.getGeneratedFile());
18 ilm 861
                Map2033A.this.bar.setValue(100);
862
            }
863
        });
864
 
865
    }
866
 
867
    public Map2033A(JProgressBar bar, Date dateDeb, Date dateFin) {
19 ilm 868
        this(bar, dateDeb, dateFin, null);
869
    }
18 ilm 870
 
19 ilm 871
    public Map2033A(JProgressBar bar, Date dateDeb, Date dateFin, SQLRow posteAnalytique) {
18 ilm 872
        this.bar = bar;
873
        if (dateDeb == null && dateFin == null) {
874
            SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
875
            SQLRow rowExercice = Configuration.getInstance().getBase().getTable("EXERCICE_COMMON").getRow(rowSociete.getInt("ID_EXERCICE_COMMON"));
876
            dateFin = (Date) rowExercice.getObject("DATE_FIN");
877
            dateDeb = (Date) rowExercice.getObject("DATE_DEB");
878
        }
879
 
880
        this.dateDebut = dateDeb;
881
        this.dateFin = dateFin;
19 ilm 882
        this.sommeCompte = new SommeCompte(posteAnalytique);
18 ilm 883
    }
884
 
885
    public Map2033A(JProgressBar bar) {
886
 
887
        this(bar, null, null);
888
    }
889
 
890
    public void generateMap2033A() {
891
        this.start();
892
    }
893
}