OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 165 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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