OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 149 Rev 177
Line 63... Line 63...
63
 
63
 
64
        final List<SQLTableElement> list = new Vector<SQLTableElement>();
64
        final List<SQLTableElement> list = new Vector<SQLTableElement>();
65
 
65
 
66
        final SQLTableElement tableElementNom = new SQLTableElement(e.getTable().getField("NOM"));
66
        final SQLTableElement tableElementNom = new SQLTableElement(e.getTable().getField("NOM"));
67
        list.add(tableElementNom);
67
        list.add(tableElementNom);
-
 
68
        if (e.getTable().contains("ID_TYPE_CMD")) {
-
 
69
            final SQLTableElement cat = new SQLTableElement(e.getTable().getField("ID_TYPE_CMD"));
-
 
70
            list.add(cat);
-
 
71
        }
-
 
72
        if (e.getTable().contains("ID_CATEGORIE_HEURE")) {
-
 
73
            final SQLTableElement cat = new SQLTableElement(e.getTable().getField("ID_CATEGORIE_HEURE"));
-
 
74
            list.add(cat);
-
 
75
        }
-
 
76
 
68
        final SQLTableElement fam = new SQLTableElement(e.getTable().getField("ID_FAMILLE_ARTICLE"));
77
        final SQLTableElement fam = new SQLTableElement(e.getTable().getField("ID_FAMILLE_ARTICLE"));
69
        list.add(fam);
78
        list.add(fam);
-
 
79
 
70
        final SQLField fieldHA = e.getTable().getField("PA_HT");
80
        final SQLField fieldHA = e.getTable().getField("PA_HT");
71
        final DeviseNumericCellEditor editorPAHT = new DeviseNumericCellEditor(fieldHA);
81
        final DeviseNumericCellEditor editorPAHT = new DeviseNumericCellEditor(fieldHA);
72
        final SQLTableElement pa = new SQLTableElement(fieldHA, BigDecimal.class, editorPAHT);
82
        final SQLTableElement pa = new SQLTableElement(fieldHA, BigDecimal.class, editorPAHT);
73
        pa.setRenderer(new DeviseTableCellRenderer());
83
        pa.setRenderer(new DeviseTableCellRenderer());
-
 
84
        if (e.getTable().contains("ID_CATEGORIE_HEURE")) {
-
 
85
            pa.setEditable(false);
-
 
86
        }
74
        list.add(pa);
87
        list.add(pa);
75
 
88
 
76
        final SQLField fieldPV = e.getTable().getField("PV_HT");
89
        final SQLField fieldPV = e.getTable().getField("PV_HT");
77
        final DeviseNumericCellEditor editorPVHT = new DeviseNumericCellEditor(fieldPV);
90
        final DeviseNumericCellEditor editorPVHT = new DeviseNumericCellEditor(fieldPV);
78
        final SQLTableElement pv = new SQLTableElement(fieldPV, BigDecimal.class, editorPVHT);
91
        final SQLTableElement pv = new SQLTableElement(fieldPV, BigDecimal.class, editorPVHT);
Line 86... Line 99...
86
            }
99
            }
87
        };
100
        };
88
        qteU.setRenderer(new DeviseTableCellRenderer());
101
        qteU.setRenderer(new DeviseTableCellRenderer());
89
        list.add(qteU);
102
        list.add(qteU);
90
 
103
        
-
 
104
        if (e.getTable().contains("ANT")) {
-
 
105
            SQLTableElement ant = new SQLTableElement(e.getTable().getField("ANT"), BigDecimal.class) {
-
 
106
 
-
 
107
                protected Object getDefaultNullValue() {
-
 
108
                    return BigDecimal.ZERO;
-
 
109
                }
-
 
110
            };
-
 
111
            ant.setRenderer(new DeviseTableCellRenderer());
-
 
112
            list.add(ant);
-
 
113
        }
-
 
114
        
-
 
115
        if (e.getTable().contains("RESTANT")) {
-
 
116
            SQLTableElement restant = new SQLTableElement(e.getTable().getField("RESTANT"), BigDecimal.class) {
-
 
117
 
-
 
118
                protected Object getDefaultNullValue() {
-
 
119
                    return BigDecimal.ZERO;
-
 
120
                }
-
 
121
            };
-
 
122
            restant.setRenderer(new DeviseTableCellRenderer());
-
 
123
            list.add(restant);
-
 
124
        }
-
 
125
 
91
        final SQLTableElement unit = new SQLTableElement(e.getTable().getField("ID_UNITE_VENTE"));
126
        final SQLTableElement unit = new SQLTableElement(e.getTable().getField("ID_UNITE_VENTE"));
92
        list.add(unit);
127
        list.add(unit);
93
 
128
 
94
        final SQLField fieldTotalHA = e.getTable().getField("T_PA_HT");
129
        final SQLField fieldTotalHA = e.getTable().getField("T_PA_HT");
95
        final DeviseNumericCellEditor editorTotalPAHT = new DeviseNumericCellEditor(fieldTotalHA);
130
        final DeviseNumericCellEditor editorTotalPAHT = new DeviseNumericCellEditor(fieldTotalHA);