OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 83 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83 Rev 180
Line 21... Line 21...
21
import org.openconcerto.sql.model.SQLRow;
21
import org.openconcerto.sql.model.SQLRow;
22
 
22
 
23
public class VenteFactureXmlSheet extends AbstractSheetXMLWithDate {
23
public class VenteFactureXmlSheet extends AbstractSheetXMLWithDate {
24
 
24
 
25
    public static final String TEMPLATE_ID = "VenteFacture";
25
    public static final String TEMPLATE_ID = "VenteFacture";
-
 
26
    public static final String TEMPLATE_SITUATION_SUFFIX = "Situation";
26
    public static final String TEMPLATE_PROPERTY_NAME = "LocationFacture";
27
    public static final String TEMPLATE_PROPERTY_NAME = "LocationFacture";
27
 
28
 
28
    @Override
29
    @Override
29
    public String getReference() {
30
    public String getReference() {
30
        return this.row.getString("NOM");
31
        return this.row.getString("NOM");
Line 44... Line 45...
44
    }
45
    }
45
 
46
 
46
    @Override
47
    @Override
47
    public SQLRow getRowLanguage() {
48
    public SQLRow getRowLanguage() {
48
        SQLRow rowClient = this.row.getForeignRow("ID_CLIENT");
49
        SQLRow rowClient = this.row.getForeignRow("ID_CLIENT");
-
 
50
 
49
        if (rowClient.getTable().contains("ID_LANGUE")) {
51
        if (rowClient.getTable().contains("ID_LANGUE")) {
-
 
52
            if (!rowClient.isForeignEmpty("ID_LANGUE")) {
50
            return rowClient.getForeignRow("ID_LANGUE");
53
                return rowClient.getForeign("ID_LANGUE");
-
 
54
            } else {
-
 
55
                return null;
-
 
56
            }
51
        } else {
57
        } else {
52
            return super.getRowLanguage();
58
            return super.getRowLanguage();
53
        }
59
        }
54
    }
60
    }
55
 
61
 
Line 66... Line 72...
66
        if (row.getBoolean("COMPLEMENT")) {
72
        if (row.getBoolean("COMPLEMENT")) {
67
            type = "Complement";
73
            type = "Complement";
68
        } else if (row.getBoolean("ACOMPTE")) {
74
        } else if (row.getBoolean("ACOMPTE")) {
69
            type = "Acompte";
75
            type = "Acompte";
70
        } else if (row.getBoolean("PARTIAL") || row.getBoolean("SOLDE")) {
76
        } else if (row.getBoolean("PARTIAL") || row.getBoolean("SOLDE")) {
71
            type = "Situation";
77
            type = TEMPLATE_SITUATION_SUFFIX;
72
        } else {
78
        } else {
73
            type = null;
79
            type = null;
74
 
80
 
75
        }
81
        }
76
 
82