OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 180
Line 70... Line 70...
70
    }
70
    }
71
 
71
 
72
    Date date;
72
    Date date;
73
 
73
 
74
    @Override
74
    @Override
75
    public String getName() {
-
 
76
        if (this.date == null) {
-
 
77
            this.date = new Date();
-
 
78
        }
-
 
79
        return "GrandLivre" + date.getTime();
-
 
80
    }
-
 
81
 
-
 
82
    @Override
-
 
83
    protected String getStoragePathP() {
75
    protected String getStoragePathP() {
84
        return "Grand Livre";
76
        return "Grand Livre";
85
    }
77
    }
86
 
78
 
87
    public GrandLivreSheetXML(Date du, Date au, String compteDep, String compteEnd, int lettrage, boolean cumul, boolean excludeCptSolde, boolean centralClient, boolean centralFourn,
79
    public GrandLivreSheetXML(Date du, Date au, String compteDep, String compteEnd, int lettrage, boolean cumul, boolean excludeCptSolde, boolean centralClient, boolean centralFourn,
Line 107... Line 99...
107
    }
99
    }
108
 
100
 
109
    private String toDay = dateFormat.format(new Date());
101
    private String toDay = dateFormat.format(new Date());
110
    private int size;
102
    private int size;
111
 
103
 
112
    // private void makeEntete(int rowDeb) {
-
 
113
    //
-
 
114
    // this.mCell.put("A" + rowDeb, this.rowSociete.getObject("NOM"));
-
 
115
    // this.mCell.put("G" + rowDeb, "Edition du " + this.toDay);
-
 
116
    // // this.mCell.put("D" + (rowDeb + 2), "Grand livre");
-
 
117
    // // System.err.println("MAKE ENTETE");
-
 
118
    // }
-
 
119
    //
-
 
120
    // private void makePiedPage(int row, String comptes) {
-
 
121
    // this.mCell.put("A" + row, "Compte : " + comptes);
-
 
122
    // this.mCell.put("E" + row, "Période du " + dateFormatEcr.format(this.dateDu) + " au " +
-
 
123
    // dateFormatEcr.format(this.dateAu));
-
 
124
    // }
-
 
125
    private List<Map<String, Object>> recapSousTotaux = new ArrayList<>();
104
    private List<Map<String, Object>> recapSousTotaux = new ArrayList<>();
126
 
105
 
-
 
106
    @Override
-
 
107
    public String getName() {
-
 
108
        if (this.date == null) {
-
 
109
            this.date = new Date();
-
 
110
        }
-
 
111
        return "GrandLivre" + this.date.getTime();
-
 
112
    }
-
 
113
 
127
    private void makeSousTotal(String numCpt, String nomCpt, Map<String, Object> line, Map<Integer, String> style, int pos, long debit, long credit) {
114
    private void makeSousTotal(String numCpt, String nomCpt, Map<String, Object> line, Map<Integer, String> style, int pos, long debit, long credit) {
128
        style.put(pos, "Titre 1");
115
        style.put(pos, "Titre 1");
129
 
116
 
130
        line.put("DATE", "");
117
        line.put("DATE", "");
131
        line.put("JOURNAL", "");
118
        line.put("JOURNAL", "");
Line 520... Line 507...
520
        Date end = new Date();
507
        Date end = new Date();
521
        System.err.println("///////// TAKE " + (end.getTime() - d.getTime()) + " millisecondes TO CREATE MAP");
508
        System.err.println("///////// TAKE " + (end.getTime() - d.getTime()) + " millisecondes TO CREATE MAP");
522
    }
509
    }
523
 
510
 
524
    private List<Integer> getListeCompteSolde() {
511
    private List<Integer> getListeCompteSolde() {
525
        SQLSelect sel = new SQLSelect(base);
512
        SQLSelect sel = new SQLSelect();
526
 
-
 
527
        sel.addSelect(tableCompte.getField("ID"));
513
        sel.addSelect(tableEcriture.getField("ID_COMPTE_PCE"));
528
        sel.addSelect(tableEcriture.getField("DEBIT"), "SUM");
514
        sel.addSelect(tableEcriture.getField("DEBIT"), "SUM");
529
        sel.addSelect(tableEcriture.getField("CREDIT"), "SUM");
515
        sel.addSelect(tableEcriture.getField("CREDIT"), "SUM");
530
 
516
 
531
        Where w = getWhere(null);
517
        Where w = getWhere(null);
532
 
518
 
533
        sel.setWhere(w);
519
        sel.setWhere(w);
-
 
520
        sel.addGroupBy(tableEcriture.getField("ID_COMPTE_PCE"));
534
 
521
 
535
        String req = sel.asString() + " GROUP BY \"COMPTE_PCE\".\"ID\"";
522
        String req = sel.asString();
536
        System.err.println(req);
523
        System.err.println(req);
537
        List<Object[]> l = (List) base.getDataSource().execute(req, new ArrayListHandler());
524
        List<Object[]> l = (List) base.getDataSource().execute(req, new ArrayListHandler());
538
        List<Integer> list = new ArrayList<Integer>();
525
        List<Integer> list = new ArrayList<Integer>();
539
        for (Object[] o : l) {
526
        for (Object[] o : l) {
540
            long credit = 0;
527
            long credit = 0;