OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 132 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 156
Line 18... Line 18...
18
import org.openconcerto.sql.Configuration;
18
import org.openconcerto.sql.Configuration;
19
import org.openconcerto.sql.model.SQLRow;
19
import org.openconcerto.sql.model.SQLRow;
20
 
20
 
21
public class PdfGenerator_2033B extends PdfGenerator {
21
public class PdfGenerator_2033B extends PdfGenerator {
22
    public PdfGenerator_2033B() {
22
    public PdfGenerator_2033B() {
23
        super("2033B.pdf", "result_2033B.pdf", TemplateNXProps.getInstance().getStringProperty("Location2033BPDF"));
23
        super("2033B.pdf", "2033B.pdf", TemplateNXProps.getInstance().getStringProperty("Location2033BPDF"));
24
        setTemplateOffset(0, 0);
24
        setTemplateOffset(0, 0);
25
        setOffset(0, 0);
25
        setOffset(0, 0);
26
        setMargin(32, 32);
-
 
27
 
-
 
28
    }
26
    }
29
 
27
 
30
    public void generate() {
28
    public void generate() {
31
        setFontRoman(8);
29
        setFontRoman(8);
32
 
30
 
33
        SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
31
        SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
34
        addText("NOM", rowSociete.getString("TYPE") + " " + rowSociete.getString("NOM"), 228, 808);
32
        addText("NOM", rowSociete.getString("TYPE") + " " + rowSociete.getString("NOM"), 228, 808);
35
        setFontRoman(12);
33
        setFontRoman(12);
36
 
34
 
37
        addSplittedText("CLOS1", "08202006", 410, 790, 9.7);
35
        addSplittedText("CLOS1", "08202006", 410, 790, 9.7);
38
        // addSplittedText("CLOS2", "08202006", 502, 809, 9.7);
-
 
39
 
36
 
40
        // Copyright
37
        // Copyright
41
        setFontRoman(9);
38
        setFontRoman(9);
42
        String cc = "Document généré par le logiciel Bloc, (c) Front Software 2006";
39
        addText("", "Document généré par le logiciel OpenConcerto", getWidth() - 2, 460, 90);
43
        addText("", cc, getWidth() - 2, 460, 90);
-
 
44
 
40
 
45
        setFontRoman(10);
41
        setFontRoman(10);
46
        long t = 143785123456L;
42
        long t = 143785123456L;
47
        int yy = 0;
43
        int yy = 0;
48
        int y = 766;
44
        int y = 766;
49
        int cellHeight = 18;
45
        int cellHeight = 18;
50
        final int colN = 487;
46
        final int colN = 487;
51
        for (; y > 720; y -= cellHeight) {
47
        for (; y > 720; y -= cellHeight) {
52
 
-
 
53
            addTextRight("PRODUIT1." + yy, insertCurrencySpaces("" + t), 400, y);
48
            addTextRight("PRODUIT1." + yy, insertCurrencySpaces("" + t), 400, y);
54
            addTextRight("PRODUIT2." + yy, insertCurrencySpaces("" + t), colN, y);
49
            addTextRight("PRODUIT2." + yy, insertCurrencySpaces("" + t), colN, y);
55
            addTextRight("PRODUIT3." + yy, insertCurrencySpaces("" + t), 580, y);
50
            addTextRight("PRODUIT3." + yy, insertCurrencySpaces("" + t), 580, y);
56
            yy++;
51
            yy++;
57
        }
52
        }
58
        y += 2;
53
        y += 2;
59
        for (; y > 630; y -= cellHeight) {
54
        for (; y > 630; y -= cellHeight) {
60
 
-
 
61
            addTextRight("PRODUIT2." + yy, insertCurrencySpaces("" + t), colN, y);
55
            addTextRight("PRODUIT2." + yy, insertCurrencySpaces("" + t), colN, y);
62
            addTextRight("PRODUIT3." + yy, insertCurrencySpaces("" + t), 580, y);
56
            addTextRight("PRODUIT3." + yy, insertCurrencySpaces("" + t), 580, y);
63
            yy++;
57
            yy++;
64
        }
58
        }
65
 
59
 
Line 174... Line 168...
174
        yy++;
168
        yy++;
175
        y -= cellHeight;
169
        y -= cellHeight;
176
        //
170
        //
177
        addTextRight("T1." + yy, insertCurrencySpaces("" + t), 226, y);
171
        addTextRight("T1." + yy, insertCurrencySpaces("" + t), 226, y);
178
        addTextRight("T2." + yy, insertCurrencySpaces("" + t), 461, y);
172
        addTextRight("T2." + yy, insertCurrencySpaces("" + t), 461, y);
179
 
-
 
180
    }
173
    }
181
 
174
 
182
}
175
}