OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 177
Line 15... Line 15...
15
 
15
 
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
17
import org.openconcerto.erp.config.Gestion;
17
import org.openconcerto.erp.config.Gestion;
18
import org.openconcerto.erp.core.finance.accounting.model.SommeCompte;
18
import org.openconcerto.erp.core.finance.accounting.model.SommeCompte;
19
import org.openconcerto.sql.Configuration;
19
import org.openconcerto.sql.Configuration;
-
 
20
import org.openconcerto.sql.model.SQLField;
20
import org.openconcerto.sql.model.SQLRow;
21
import org.openconcerto.sql.model.SQLRow;
-
 
22
import org.openconcerto.sql.model.Where;
21
import org.openconcerto.utils.GestionDevise;
23
import org.openconcerto.utils.GestionDevise;
22
 
24
 
23
import java.text.DateFormat;
25
import java.text.DateFormat;
24
import java.text.SimpleDateFormat;
26
import java.text.SimpleDateFormat;
25
import java.util.Date;
27
import java.util.Date;
26
import java.util.HashMap;
28
import java.util.HashMap;
-
 
29
import java.util.List;
27
import java.util.Map;
30
import java.util.Map;
28
 
31
 
-
 
32
import javax.swing.JOptionPane;
29
import javax.swing.JProgressBar;
33
import javax.swing.JProgressBar;
30
import javax.swing.SwingUtilities;
34
import javax.swing.SwingUtilities;
31
 
35
 
32
public class Map2033A extends Thread {
36
public class Map2033A extends Thread {
33
 
37
 
Line 115... Line 119...
115
        // Racine = "109, 201, 203, 205, 208, 237"
119
        // Racine = "109, 201, 203, 205, 208, 237"
116
        // S014=201...205+208+237+232
120
        // S014=201...205+208+237+232
117
        // Fix Abaque 208 - 2087
121
        // Fix Abaque 208 - 2087
118
        long v014 = this.sommeCompte.soldeCompteDebiteur(109, 109, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("201", this.dateDebut, this.dateFin)
122
        long v014 = this.sommeCompte.soldeCompteDebiteur(109, 109, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("201", this.dateDebut, this.dateFin)
119
                + this.sommeCompte.sommeCompteFils("203", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("232", this.dateDebut, this.dateFin)
123
                + this.sommeCompte.sommeCompteFils("203", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("232", this.dateDebut, this.dateFin)
120
                + this.sommeCompte.sommeCompteFils("205", this.dateDebut, this.dateFin) + this.sommeCompte.soldeCompte(208, 208, true, this.dateDebut, this.dateFin)
124
                + this.sommeCompte.sommeCompteFils("234", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("205", this.dateDebut, this.dateFin)
121
                - this.sommeCompte.soldeCompte(2087, 2087, true, this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("237", this.dateDebut, this.dateFin);
125
                + this.sommeCompte.soldeCompte(208, 208, true, this.dateDebut, this.dateFin) - this.sommeCompte.soldeCompte(2087, 2087, true, this.dateDebut, this.dateFin)
-
 
126
                + this.sommeCompte.sommeCompteFils("237", this.dateDebut, this.dateFin);
122
        this.m.put("ACTIF1.1", GestionDevise.currencyToString(v014, false));
127
        this.m.put("ACTIF1.1", GestionDevise.currencyToString(v014, false));
123
 
128
 
124
        // 016 -SommeSolde( 280, 280* ) - SommeSolde(2905) - SommeSolde (2908)
129
        // 016 -SommeSolde( 280, 280* ) - SommeSolde(2905) - SommeSolde (2908)
125
        // RacineDap = "2800, 2801, 2803, 2805, 2808, 2908, 2905"
130
        // RacineDap = "2800, 2801, 2803, 2805, 2808, 2908, 2905"
126
        // S016=-2801-2803-2805-2905-2808-2908-2932
131
        // S016=-2801-2803-2805-2905-2808-2908-2932
Line 146... Line 151...
146
         ******************************************************************************************/
151
         ******************************************************************************************/
147
        // 028 SommeSolde( 210, 236* )+SommeSolde( 238, 259* )
152
        // 028 SommeSolde( 210, 236* )+SommeSolde( 238, 259* )
148
        // Racine = "210-215, 218, 230-231, 238"
153
        // Racine = "210-215, 218, 230-231, 238"
149
        // S028=211...215+218+22+231+238
154
        // 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)
155
        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);
156
                + this.sommeCompte.sommeCompteFils("231", this.dateDebut, this.dateFin) + this.sommeCompte.sommeCompteFils("238", this.dateDebut, this.dateFin)
-
 
157
                + this.sommeCompte.soldeCompte(24, 24, true, this.dateDebut, this.dateFin);
152
        this.m.put("ACTIF1.2", GestionDevise.currencyToString(v028, false));
158
        this.m.put("ACTIF1.2", GestionDevise.currencyToString(v028, false));
153
 
159
 
154
        // 030 -SommeSolde( 281, 289* )-SommeSolde( 290, 295* )
160
        // 030 -SommeSolde( 281, 289* )-SommeSolde( 290, 295* )
155
        // RacineDap = "2810-2815, 2818, 2930-2931, 291"
161
        // RacineDap = "2810-2815, 2818, 2930-2931, 291"
156
        // S030=-2811-2812-2911-2813-2814-2815-2818-282-292-2931
162
        // S030=-2811-2812-2911-2813-2814-2815-2818-282-292-2931
Line 577... Line 583...
577
        // Racine = "12, 6"
583
        // Racine = "12, 6"
578
        // S136=-6-7
584
        // S136=-6-7
579
        // Racine1 = "7"
585
        // Racine1 = "7"
580
        // long v136 = -this.sommeCompte.sommeCompteFils("12", dateDebut,
586
        // long v136 = -this.sommeCompte.sommeCompteFils("12", dateDebut,
581
        // dateFin);
587
        // dateFin);
582
        long v136 = -this.sommeCompte.sommeCompteFils("7", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("6", this.dateDebut, this.dateFin);
588
        long v136 = -this.sommeCompte.sommeCompteFils("12", this.dateDebut, this.dateFin) - this.sommeCompte.sommeCompteFils("7", this.dateDebut, this.dateFin)
-
 
589
                - this.sommeCompte.sommeCompteFils("6", this.dateDebut, this.dateFin);
-
 
590
 
583
        this.m.put("PASSIF3.21", GestionDevise.currencyToString(v136, false));
591
        this.m.put("PASSIF3.21", GestionDevise.currencyToString(v136, false));
584
 
592
 
585
        // 137 -N-1: +R136
593
        // 137 -N-1: +R136
586
        this.m.put("PASSIF4.21", "");
594
        this.m.put("PASSIF4.21", "");
587
 
595
 
Line 845... Line 853...
845
 
853
 
846
        this.m.put("PASSIF4.32", "");
854
        this.m.put("PASSIF4.32", "");
847
        this.m.put("PASSIF4.33", "");
855
        this.m.put("PASSIF4.33", "");
848
        this.m.put("PASSIF4.34", "");
856
        this.m.put("PASSIF4.34", "");
849
 
857
 
-
 
858
        final SQLField field = ComptaPropsConfiguration.getInstanceCompta().getRootSociete().getTable("COMPTE_PCE").getField("NUMERO");
-
 
859
        Where where = new Where(field, "NOT LIKE", "6%");
-
 
860
        where = where.and(new Where(field, "NOT LIKE", "7%"));
-
 
861
        where = where.and(new Where(field, "NOT LIKE", "8%"));
-
 
862
        List<String> unused = this.sommeCompte.getNonUsedCompte(where, this.dateDebut, this.dateFin);
-
 
863
        if (unused != null && !unused.isEmpty()) {
-
 
864
            JOptionPane.showMessageDialog(null, "Certains comptes n'ont pas été intégré : " + unused);
-
 
865
        }
-
 
866
 
850
        p.generateFrom(this.m);
867
        p.generateFrom(this.m);
851
 
868
 
852
        SwingUtilities.invokeLater(new Runnable() {
869
        SwingUtilities.invokeLater(new Runnable() {
853
            public void run() {
870
            public void run() {
854
                Map2033A.this.bar.setValue(95);
871
                Map2033A.this.bar.setValue(95);