OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
165 ilm 1
/*
2
 * Créé le 18 oct. 2011
3
 */
4
package org.openconcerto.modules.customersupport;
5
 
6
import org.openconcerto.erp.generationDoc.AbstractSheetXMLWithDate;
7
import org.openconcerto.erp.preferences.PrinterNXProps;
8
import org.openconcerto.sql.Configuration;
9
import org.openconcerto.sql.model.SQLRow;
10
 
11
public class CustomerSupportTicketSheetXML extends AbstractSheetXMLWithDate {
12
 
13
    public static String TEMPLATE_ID = "CustomerSupportTicket";
14
    public static String TEMPLATE_PROPERTY_NAME = "LocationCmd";
15
 
16
    // private static final Tuple2<String, String> tuple = Tuple2.create("LocationDmd",
17
    // "Demande de prix");
18
    //
19
    // public static Tuple2<String, String> getTuple2Location() {
20
    // return tuple;
21
    // }
22
 
23
    @Override
24
    public String getReference() {
25
        return this.row.getString("NUMERO");
26
    }
27
 
28
    // FIXME Prefs printer location
29
    public CustomerSupportTicketSheetXML(SQLRow row) {
30
        super(row);
31
        this.printer = PrinterNXProps.getInstance().getStringProperty("CmdPrinter");
32
        this.elt = Configuration.getInstance().getDirectory().getElement(Module.TABLE_CUSTOMER_SUPPORT_TICKET);
33
    }
34
 
35
    @Override
36
    public String getTemplateId() {
37
        return "TicketSupport";
38
    }
39
 
40
    public String getName() {
41
        return "TicketSupport_" + this.row.getString("NUMBER");
42
    }
43
 
44
    @Override
45
    public String getDefaultTemplateId() {
46
        return "TicketSupport";
47
    }
48
}