OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 180 Rev 182
Line 1... Line 1...
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.
Line 20... Line 20...
20
import org.openconcerto.sql.model.SQLField;
20
import org.openconcerto.sql.model.SQLField;
21
import org.openconcerto.sql.model.SQLRow;
21
import org.openconcerto.sql.model.SQLRow;
22
import org.openconcerto.sql.model.Where;
22
import org.openconcerto.sql.model.Where;
23
import org.openconcerto.utils.GestionDevise;
23
import org.openconcerto.utils.GestionDevise;
24
 
24
 
-
 
25
import java.io.File;
25
import java.text.DateFormat;
26
import java.text.DateFormat;
26
import java.text.SimpleDateFormat;
27
import java.text.SimpleDateFormat;
27
import java.util.Date;
28
import java.util.Date;
28
import java.util.HashMap;
29
import java.util.HashMap;
29
import java.util.List;
30
import java.util.List;
Line 385... Line 386...
385
 
386
 
386
        /*******************************************************************************************
387
        /*******************************************************************************************
387
         * CHARGES FINANCIERES
388
         * CHARGES FINANCIERES
388
         ******************************************************************************************/
389
         ******************************************************************************************/
389
        // 294 SommeSolde( 66, 66* )+SommeSolde( 686, 686* )
390
        // 294 SommeSolde( 66, 66* )+SommeSolde( 686, 686* )
390
        long v294 = this.sommeCompte.soldeCompte(661, 661, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(686, 686, true, this.dateDeb, this.dateFin)
391
        long v294 = this.sommeCompte.soldeCompte(660, 669, true, this.dateDeb, this.dateFin) + this.sommeCompte.soldeCompte(686, 686, true, this.dateDeb, this.dateFin);
391
                + this.sommeCompte.soldeCompte(664, 668, true, this.dateDeb, this.dateFin);
-
 
392
        this.m.put("PCHARGES3.23", GestionDevise.currencyToString(v294, false));
392
        this.m.put("PCHARGES3.23", GestionDevise.currencyToString(v294, false));
393
 
393
 
394
        // 246
394
        // 246
395
        this.m.put("PCHARGES4.23", "");
395
        this.m.put("PCHARGES4.23", "");
396
 
396
 
Line 438... Line 438...
438
        // TODO répartir les comptes débiteurs
438
        // TODO répartir les comptes débiteurs
439
        long v374 = this.sommeCompte.soldeCompteCrediteur(4457, 4457, true, this.dateDeb, this.dateFin);
439
        long v374 = this.sommeCompte.soldeCompteCrediteur(4457, 4457, true, this.dateDeb, this.dateFin);
440
        this.m.put("T1.41", GestionDevise.currencyToString(v374, false));
440
        this.m.put("T1.41", GestionDevise.currencyToString(v374, false));
441
 
441
 
442
        // 378 SommeSoldeCredit( 44566 )
442
        // 378 SommeSoldeCredit( 44566 )
443
        long v378 = this.sommeCompte.soldeCompteDebiteur(44566, 44566, true, this.dateDeb, this.dateFin);
443
        long v378 = this.sommeCompte.soldeCompteDebiteur(4456, 4456, true, this.dateDeb, this.dateFin);
444
        this.m.put("T1.42", GestionDevise.currencyToString(v378, false));
444
        this.m.put("T1.42", GestionDevise.currencyToString(v378, false));
445
 
445
 
446
        SwingUtilities.invokeLater(new Runnable() {
446
        SwingUtilities.invokeLater(new Runnable() {
447
            public void run() {
447
            public void run() {
448
                Map2033B.this.bar.setValue(95);
448
                Map2033B.this.bar.setValue(95);
Line 506... Line 506...
506
        // this.sommeCompte.getNonUsedCompte(where, this.dateDeb, this.dateFin);
506
        // this.sommeCompte.getNonUsedCompte(where, this.dateDeb, this.dateFin);
507
        p.generateFrom(this.m);
507
        p.generateFrom(this.m);
508
 
508
 
509
        SwingUtilities.invokeLater(new Runnable() {
509
        SwingUtilities.invokeLater(new Runnable() {
510
            public void run() {
510
            public void run() {
-
 
511
                final File generatedFile = p.getGeneratedFile();
-
 
512
                if (generatedFile != null) {
511
                Gestion.openPDF(p.getGeneratedFile());
513
                    Gestion.openPDF(generatedFile);
-
 
514
                } else {
512
                Map2033B.this.bar.setValue(100);
515
                    Map2033B.this.bar.setValue(100);
513
            }
516
                }
-
 
517
            }
514
        });
518
        });
515
    }
519
    }
516
 
520
 
517
    public Map2033B(JProgressBar bar, Date dateDeb, Date dateFin) {
521
    public Map2033B(JProgressBar bar, Date dateDeb, Date dateFin) {
518
        this(bar, dateDeb, dateFin, null);
522
        this(bar, dateDeb, dateFin, null);