OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 * Créé le 18 oct. 2011
 */
package org.openconcerto.modules.customersupport;

import org.openconcerto.erp.generationDoc.AbstractSheetXMLWithDate;
import org.openconcerto.erp.preferences.PrinterNXProps;
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.model.SQLRow;

public class CustomerSupportTicketSheetXML extends AbstractSheetXMLWithDate {

    public static String TEMPLATE_ID = "CustomerSupportTicket";
    public static String TEMPLATE_PROPERTY_NAME = "LocationCmd";

    // private static final Tuple2<String, String> tuple = Tuple2.create("LocationDmd",
    // "Demande de prix");
    //
    // public static Tuple2<String, String> getTuple2Location() {
    // return tuple;
    // }

    @Override
    public String getReference() {
        return this.row.getString("NUMERO");
    }

    // FIXME Prefs printer location
    public CustomerSupportTicketSheetXML(SQLRow row) {
        super(row);
        this.printer = PrinterNXProps.getInstance().getStringProperty("CmdPrinter");
        this.elt = Configuration.getInstance().getDirectory().getElement(Module.TABLE_CUSTOMER_SUPPORT_TICKET);
    }

    @Override
    public String getTemplateId() {
        return "TicketSupport";
    }

    public String getName() {
        return "TicketSupport_" + this.row.getString("NUMBER");
    }

    @Override
    public String getDefaultTemplateId() {
        return "TicketSupport";
    }
}