OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 19 Rev 25
Line 14... Line 14...
14
 package org.openconcerto.erp.core.finance.accounting.report;
14
 package org.openconcerto.erp.core.finance.accounting.report;
15
 
15
 
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
17
import org.openconcerto.erp.core.finance.accounting.element.ComptePCESQLElement;
17
import org.openconcerto.erp.core.finance.accounting.element.ComptePCESQLElement;
18
import org.openconcerto.erp.generationDoc.SheetInterface;
18
import org.openconcerto.erp.generationDoc.SheetInterface;
19
import org.openconcerto.erp.generationDoc.SheetXml;
-
 
20
import org.openconcerto.erp.preferences.PrinterNXProps;
19
import org.openconcerto.erp.preferences.PrinterNXProps;
21
import org.openconcerto.erp.rights.ComptaUserRight;
20
import org.openconcerto.erp.rights.ComptaUserRight;
22
import org.openconcerto.sql.Configuration;
21
import org.openconcerto.sql.Configuration;
23
import org.openconcerto.sql.model.SQLRow;
22
import org.openconcerto.sql.model.SQLRow;
24
import org.openconcerto.sql.model.SQLRowValues;
23
import org.openconcerto.sql.model.SQLRowValues;
Line 26... Line 25...
26
import org.openconcerto.sql.model.SQLSelect;
25
import org.openconcerto.sql.model.SQLSelect;
27
import org.openconcerto.sql.model.SQLTable;
26
import org.openconcerto.sql.model.SQLTable;
28
import org.openconcerto.sql.model.Where;
27
import org.openconcerto.sql.model.Where;
29
import org.openconcerto.sql.users.UserManager;
28
import org.openconcerto.sql.users.UserManager;
30
import org.openconcerto.utils.GestionDevise;
29
import org.openconcerto.utils.GestionDevise;
31
import org.openconcerto.utils.Tuple2;
-
 
32
import org.openconcerto.utils.cc.ITransformer;
30
import org.openconcerto.utils.cc.ITransformer;
33
 
31
 
34
import java.io.File;
-
 
35
import java.text.DateFormat;
32
import java.text.DateFormat;
36
import java.util.ArrayList;
33
import java.util.ArrayList;
37
import java.util.Calendar;
34
import java.util.Calendar;
38
import java.util.Date;
35
import java.util.Date;
39
import java.util.HashMap;
36
import java.util.HashMap;
Line 64... Line 61...
64
    private boolean excludeCompteSolde = true;
61
    private boolean excludeCompteSolde = true;
65
    private boolean centralClient = false;
62
    private boolean centralClient = false;
66
    private boolean centralFourn = false;
63
    private boolean centralFourn = false;
67
    int idJrnlExclude = -1;
64
    int idJrnlExclude = -1;
68
 
65
 
-
 
66
    public static String TEMPLATE_ID = "Grand Livre";
-
 
67
    public static String TEMPLATE_PROPERTY_NAME = "LocationGrandLivre";
-
 
68
 
69
    public static void setSize(int debut, int fin) {
69
    public static void setSize(int debut, int fin) {
70
        debutFill = debut;
70
        debutFill = debut;
71
        endFill = fin;
71
        endFill = fin;
72
    }
72
    }
73
 
73
 
74
    static {
74
    static {
75
        setSize(7, 69);
75
        setSize(7, 69);
76
    }
76
    }
77
 
77
 
78
    private static final Tuple2<String, String> tuple = Tuple2.create("LocationGrandLivre", "Grand Livre");
-
 
79
 
78
    @Override
80
    public static Tuple2<String, String> getTuple2Location() {
79
    protected String getYear() {
81
        return tuple;
80
        return "";
82
    }
81
    }
83
 
82
 
84
    public GrandLivreSheet(Date du, Date au, String compteDep, String compteEnd, int lettrage, boolean cumul, boolean excludeCptSolde, boolean centralClient, boolean centralFourn, int idJrnlExclude) {
83
    public GrandLivreSheet(Date du, Date au, String compteDep, String compteEnd, int lettrage, boolean cumul, boolean excludeCptSolde, boolean centralClient, boolean centralFourn, int idJrnlExclude) {
85
        super();
84
        super();
86
        Calendar cal = Calendar.getInstance();
85
        Calendar cal = Calendar.getInstance();
87
        cal.setTime(au);
86
        cal.setTime(au);
88
        this.nbRowsPerPage = 72;
87
        this.nbRowsPerPage = 72;
89
        this.idJrnlExclude = idJrnlExclude;
88
        this.idJrnlExclude = idJrnlExclude;
90
        this.printer = PrinterNXProps.getInstance().getStringProperty("GrandLivrePrinter");
89
        this.printer = PrinterNXProps.getInstance().getStringProperty("GrandLivrePrinter");
91
        this.modele = "GrandLivre.ods";
90
        this.modele = "GrandLivre.ods";
92
        this.locationOO = SheetXml.getLocationForTuple(tuple, false) + File.separator + cal.get(Calendar.YEAR);
-
 
93
        this.locationPDF = SheetXml.getLocationForTuple(tuple, true) + File.separator + cal.get(Calendar.YEAR);
-
 
94
        this.dateAu = au;
91
        this.dateAu = au;
95
        this.dateDu = du;
92
        this.dateDu = du;
96
        this.compteDeb = compteDep.trim();
93
        this.compteDeb = compteDep.trim();
97
        this.compteEnd = compteEnd.trim();
94
        this.compteEnd = compteEnd.trim();
98
        this.lettrage = lettrage;
95
        this.lettrage = lettrage;
Line 619... Line 616...
619
            }
616
            }
620
        }
617
        }
621
 
618
 
622
        return map;
619
        return map;
623
    }
620
    }
-
 
621
 
-
 
622
    @Override
-
 
623
    public String getTemplateId() {
-
 
624
        // TODO Auto-generated method stub
-
 
625
        return TEMPLATE_ID;
-
 
626
    }
624
}
627
}