OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 18 Rev 156
Line 19... Line 19...
19
import org.openconcerto.sql.model.SQLRow;
19
import org.openconcerto.sql.model.SQLRow;
20
 
20
 
21
public class PdfGenerator_2033E extends PdfGenerator {
21
public class PdfGenerator_2033E extends PdfGenerator {
22
 
22
 
23
    public PdfGenerator_2033E() {
23
    public PdfGenerator_2033E() {
24
        super("2033E.pdf", "result_2033E.pdf", TemplateNXProps.getInstance().getStringProperty("Location2033E"));
24
        super("2033E.pdf", "2033E.pdf", TemplateNXProps.getInstance().getStringProperty("Location2033E"));
25
        setTemplateOffset(0, 0);
25
        setTemplateOffset(0, 0);
26
        setOffset(0, 0);
26
        setOffset(0, 0);
27
        setMargin(32, 32);
-
 
28
    }
27
    }
29
 
28
 
30
    public void generate() {
29
    public void generate() {
31
        setFontBold(14);
30
        setFontBold(14);
32
 
-
 
33
        SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
31
        final SQLRow rowSociete = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
34
        addText("NOM", rowSociete.getString("TYPE") + " " + rowSociete.getString("NOM"), 138, 722);
32
        addText("NOM", rowSociete.getString("TYPE") + " " + rowSociete.getString("NOM"), 138, 722);
35
 
-
 
36
        setFontRoman(12);
33
        setFontRoman(12);
37
        addText("OUVERT", "1er janvier 2004", 105, 703);
34
        addText("OUVERT", "1er janvier 2004", 105, 703);
38
        addText("CLOS", "31 décembre 2004", 274, 703);
35
        addText("CLOS", "31 décembre 2004", 274, 703);
39
        addSplittedText("DUREE", "12", 502, 703, 19);
36
        addSplittedText("DUREE", "12", 502, 703, 19);
40
 
37
 
41
        // Copyright
38
        // Copyright
42
        setFontRoman(9);
39
        setFontRoman(9);
43
        String cc = "Document généré par le logiciel Bloc, (c) Front Software 2006";
40
        addText("", "Document généré par le logiciel OpenConcerto", 350, 161, 0);
44
        addText("", cc, 350, 161, 0);
-
 
45
 
41
 
46
        setFontRoman(10);
42
        setFontRoman(10);
47
        long t = 785123456L;
43
        long t = 785123456L;
48
        int yy = 0;
44
        int yy = 0;
49
        int y = 651;
45
        int y = 651;
50
        for (int i = 0; i < 8; i++) {
46
        for (int i = 0; i < 8; i++) {
51
 
-
 
52
            addTextRight("PROD1." + yy, insertCurrencySpaces("" + t), 563, y);
47
            addTextRight("PROD1." + yy, insertCurrencySpaces("" + t), 563, y);
53
 
-
 
54
            yy++;
48
            yy++;
55
            y -= 18;
49
            y -= 18;
56
        }
50
        }
57
        y -= 18;
51
        y -= 18;
58
        for (int i = 0; i < 11; i++) {
52
        for (int i = 0; i < 11; i++) {
59
 
-
 
60
            addTextRight("CONSO1." + yy, insertCurrencySpaces("" + t), 563, y);
53
            addTextRight("CONSO1." + yy, insertCurrencySpaces("" + t), 563, y);
61
 
-
 
62
            yy++;
54
            yy++;
63
            y -= 18;
55
            y -= 18;
64
        }
56
        }
65
        y -= 16;
57
        y -= 16;
66
 
58
 
67
        //
59
        //
68
        addTextRight("TOT1." + yy, insertCurrencySpaces("" + t), 563, y);
60
        addTextRight("TOT1." + yy, insertCurrencySpaces("" + t), 563, y);
69
 
-
 
70
        yy++;
-
 
71
        y -= 18;
-
 
72
 
-
 
73
    }
61
    }
74
 
62
 
75
}
63
}