Line 27... |
Line 27... |
27 |
import org.openconcerto.sql.view.list.CellDynamicModifier;
|
27 |
import org.openconcerto.sql.view.list.CellDynamicModifier;
|
28 |
import org.openconcerto.sql.view.list.RowValuesTable;
|
28 |
import org.openconcerto.sql.view.list.RowValuesTable;
|
29 |
import org.openconcerto.sql.view.list.RowValuesTableModel;
|
29 |
import org.openconcerto.sql.view.list.RowValuesTableModel;
|
30 |
import org.openconcerto.sql.view.list.RowValuesTablePanel;
|
30 |
import org.openconcerto.sql.view.list.RowValuesTablePanel;
|
31 |
import org.openconcerto.sql.view.list.SQLTableElement;
|
31 |
import org.openconcerto.sql.view.list.SQLTableElement;
|
- |
|
32 |
import org.openconcerto.ui.table.NumberCellRenderer;
|
32 |
import org.openconcerto.utils.DecimalUtils;
|
33 |
import org.openconcerto.utils.DecimalUtils;
|
33 |
|
34 |
|
34 |
import java.math.BigDecimal;
|
35 |
import java.math.BigDecimal;
|
35 |
import java.util.List;
|
36 |
import java.util.List;
|
36 |
import java.util.Vector;
|
37 |
import java.util.Vector;
|
Line 119... |
Line 120... |
119 |
|
120 |
|
120 |
this.defaultRowVals = new SQLRowValues(getSQLElement().getTable());
|
121 |
this.defaultRowVals = new SQLRowValues(getSQLElement().getTable());
|
121 |
this.defaultRowVals.put("PRIX_METRIQUE_VT_1", BigDecimal.ZERO);
|
122 |
this.defaultRowVals.put("PRIX_METRIQUE_VT_1", BigDecimal.ZERO);
|
122 |
this.defaultRowVals.put("PV_HT", BigDecimal.ZERO);
|
123 |
this.defaultRowVals.put("PV_HT", BigDecimal.ZERO);
|
123 |
this.defaultRowVals.put("PV_TTC", BigDecimal.ZERO);
|
124 |
this.defaultRowVals.put("PV_TTC", BigDecimal.ZERO);
|
- |
|
125 |
if (e.getTable().contains("POURCENT_REMISE")) {
|
- |
|
126 |
final SQLTableElement tableElementDiscount = new SQLTableElement(e.getTable().getField("POURCENT_REMISE"), BigDecimal.class) {
|
- |
|
127 |
@Override
|
- |
|
128 |
protected Object getDefaultNullValue() {
|
- |
|
129 |
return BigDecimal.ZERO;
|
- |
|
130 |
}
|
- |
|
131 |
};
|
- |
|
132 |
tableElementDiscount.setRenderer(new NumberCellRenderer());
|
- |
|
133 |
list.add(tableElementDiscount);
|
- |
|
134 |
}
|
124 |
this.model = new RowValuesTableModel(e, list, e.getTable().getField("ID_TARIF"), false, this.defaultRowVals);
|
135 |
this.model = new RowValuesTableModel(e, list, e.getTable().getField("ID_TARIF"), false, this.defaultRowVals);
|
125 |
|
136 |
|
126 |
this.table = new RowValuesTable(this.model, null);
|
137 |
this.table = new RowValuesTable(this.model, null);
|
127 |
|
138 |
|
128 |
// Calcul automatique du prix de vente unitaire HT
|
139 |
// Calcul automatique du prix de vente unitaire HT
|