OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 21 Rev 25
Line 21... Line 21...
21
import org.openconcerto.sql.Configuration;
21
import org.openconcerto.sql.Configuration;
22
import org.openconcerto.sql.element.SQLElement;
22
import org.openconcerto.sql.element.SQLElement;
23
import org.openconcerto.sql.model.SQLRow;
23
import org.openconcerto.sql.model.SQLRow;
24
import org.openconcerto.utils.Tuple2;
24
import org.openconcerto.utils.Tuple2;
25
 
25
 
-
 
26
import java.io.File;
26
import java.text.DateFormat;
27
import java.text.DateFormat;
27
import java.text.SimpleDateFormat;
28
import java.text.SimpleDateFormat;
28
import java.util.ArrayList;
29
import java.util.ArrayList;
29
import java.util.Date;
30
import java.util.Date;
30
import java.util.HashMap;
31
import java.util.HashMap;
31
import java.util.Iterator;
32
import java.util.Iterator;
32
import java.util.List;
33
import java.util.List;
33
import java.util.Map;
34
import java.util.Map;
34
 
35
 
35
public class ListeFactureXmlSheet extends AbstractListeSheetXml {
36
public class ListeFactureXmlSheet extends AbstractListeSheetXml {
-
 
37
    public static final String TEMPLATE_ID = "ListeFacture";
-
 
38
    public static final String TEMPLATE_PROPERTY_NAME = DEFAULT_PROPERTY_NAME;
36
 
39
 
37
    private List<Map<String, Object>> listValues;
40
    private List<Map<String, Object>> listValues;
38
    private static final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
41
    private static final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
39
    private List<Integer> listeIds;
-
 
40
 
42
 
41
    public static Tuple2<String, String> getTuple2Location() {
-
 
42
        return tupleDefault;
43
    private List<Integer> listeIds;
43
    }
-
 
44
 
44
 
45
    public ListeFactureXmlSheet(List<Integer> listeIds) {
45
    public ListeFactureXmlSheet(List<Integer> listeIds) {
46
        this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
46
        this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
47
        this.listeIds = listeIds;
47
        this.listeIds = listeIds;
48
        this.locationOO = SheetXml.getLocationForTuple(tupleDefault, false);
-
 
49
        this.locationPDF = SheetXml.getLocationForTuple(tupleDefault, true);
-
 
50
    }
48
    }
51
 
49
 
52
    @Override
50
    @Override
53
    public String getDefaultModele() {
51
    public String getDefaultTemplateId() {
54
        // TODO Raccord de méthode auto-généré
52
        return TEMPLATE_ID;
-
 
53
    }
-
 
54
 
-
 
55
    @Override
-
 
56
    public String getName() {
55
        return "ListeFacture";
57
        return "ListeFacture";
56
    }
58
    }
57
 
59
 
58
    protected void createListeValues() {
60
    protected void createListeValues() {
59
        SQLElement eltFacture = Configuration.getInstance().getDirectory().getElement("SAISIE_VENTE_FACTURE");
61
        SQLElement eltFacture = Configuration.getInstance().getDirectory().getElement("SAISIE_VENTE_FACTURE");
Line 98... Line 100...
98
        }
100
        }
99
 
101
 
100
        this.listAllSheetValues.put(0, this.listValues);
102
        this.listAllSheetValues.put(0, this.listValues);
101
    }
103
    }
102
 
104
 
103
    public String getFileName() {
-
 
104
        return getValidFileName("ListeFacture");
-
 
105
    }
-
 
106
}
105
}