OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 180 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
80 ilm 1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
182 ilm 4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
80 ilm 5
 *
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
9
 * language governing permissions and limitations under the License.
10
 *
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
13
 
14
 package org.openconcerto.erp.core.sales.account;
15
 
16
import org.openconcerto.erp.core.common.component.TransfertGroupSQLComponent;
17
import org.openconcerto.erp.core.common.element.NumerotationAutoSQLElement;
18
import org.openconcerto.erp.core.common.ui.AbstractArticleItemTable;
132 ilm 19
import org.openconcerto.erp.core.common.ui.AbstractVenteArticleItemTable.TypeCalcul;
80 ilm 20
import org.openconcerto.erp.core.common.ui.Acompte;
21
import org.openconcerto.erp.core.common.ui.AcompteField;
22
import org.openconcerto.erp.core.common.ui.AcompteRowItemView;
23
import org.openconcerto.erp.core.common.ui.DeviseField;
24
import org.openconcerto.erp.core.common.ui.TotalPanel;
156 ilm 25
import org.openconcerto.erp.core.customerrelationship.customer.ui.AdresseType;
142 ilm 26
import org.openconcerto.erp.core.finance.accounting.element.EcritureSQLElement;
80 ilm 27
import org.openconcerto.erp.core.sales.invoice.element.SaisieVenteFactureSQLElement;
28
import org.openconcerto.erp.core.sales.invoice.report.VenteFactureXmlSheet;
29
import org.openconcerto.erp.core.sales.invoice.ui.FactureSituationItemTable;
30
import org.openconcerto.erp.generationEcritures.GenerationMvtSaisieVenteFacture;
142 ilm 31
import org.openconcerto.erp.panel.PanelOOSQLComponent;
80 ilm 32
import org.openconcerto.sql.Configuration;
33
import org.openconcerto.sql.element.ElementSQLObject;
83 ilm 34
import org.openconcerto.sql.element.GlobalMapper;
80 ilm 35
import org.openconcerto.sql.element.SQLElement;
36
import org.openconcerto.sql.model.SQLRow;
142 ilm 37
import org.openconcerto.sql.model.SQLRowAccessor;
80 ilm 38
import org.openconcerto.sql.model.SQLRowValues;
39
import org.openconcerto.sql.model.SQLTable;
144 ilm 40
import org.openconcerto.sql.model.Where;
41
import org.openconcerto.sql.sqlobject.ElementComboBox;
80 ilm 42
import org.openconcerto.sql.sqlobject.JUniqueTextField;
43
import org.openconcerto.sql.sqlobject.SQLRequestComboBox;
44
import org.openconcerto.sql.view.EditFrame;
45
import org.openconcerto.sql.view.list.RowValuesTable;
46
import org.openconcerto.sql.view.list.SQLTableElement;
47
import org.openconcerto.ui.JDate;
48
import org.openconcerto.ui.component.ITextArea;
49
import org.openconcerto.ui.group.Group;
50
import org.openconcerto.utils.ExceptionHandler;
51
import org.openconcerto.utils.text.SimpleDocumentListener;
52
 
53
import java.awt.Component;
54
import java.beans.PropertyChangeEvent;
55
import java.beans.PropertyChangeListener;
56
import java.math.BigDecimal;
57
import java.sql.SQLException;
58
import java.util.Date;
59
import java.util.HashSet;
60
import java.util.Set;
61
 
62
import javax.swing.JCheckBox;
63
import javax.swing.JComponent;
64
import javax.swing.JLabel;
142 ilm 65
import javax.swing.JOptionPane;
80 ilm 66
import javax.swing.JTextField;
67
import javax.swing.SwingConstants;
68
import javax.swing.SwingUtilities;
69
import javax.swing.event.DocumentEvent;
177 ilm 70
import javax.swing.event.TableModelEvent;
71
import javax.swing.event.TableModelListener;
80 ilm 72
 
73
public class VenteFactureSituationSQLComponent extends TransfertGroupSQLComponent {
74
    public static final String ID = "sales.invoice.partial";
75
 
142 ilm 76
    private PanelOOSQLComponent panelOO;
77
 
80 ilm 78
    public VenteFactureSituationSQLComponent(SQLElement element) {
83 ilm 79
        super(element, (Group) GlobalMapper.getInstance().get(ID));
80 ilm 80
    }
81
 
82
    public VenteFactureSituationSQLComponent(SQLElement element, Group p) {
83
        super(element, p);
84
    }
85
 
86
    @Override
87
    protected Set<String> createRequiredNames() {
88
        final Set<String> s = new HashSet<String>(1);
89
        s.add("ID_CLIENT");
142 ilm 90
        s.add("ID_COMMERCIAL");
80 ilm 91
        s.add("NUMERO");
92
        s.add("DATE");
93
        s.add("MONTANT_FACTURABLE");
94
        s.add("ID_MODE_REGLEMENT");
95
        return s;
96
    }
97
 
98
    @Override
99
    protected RowValuesTable getRowValuesTable() {
100
 
101
        return ((AbstractArticleItemTable) getEditor("sales.invoice.partial.items.list")).getRowValuesTable();
102
    }
103
 
104
    JCheckBox box = new JCheckBox("partial");
105
 
106
    @Override
142 ilm 107
    public void select(SQLRowAccessor r) {
108
        super.select(r);
109
        final DeviseField totalRemise = (DeviseField) getEditor("REMISE_HT");
110
        totalRemise.setEditable(false);
111
        totalRemise.setEnabled(false);
112
    }
113
 
114
    @Override
80 ilm 115
    protected void addViews() {
116
 
117
        super.addViews();
118
 
119
        box.setSelected(true);
120
        this.addView(box, "PARTIAL", REQ);
121
 
122
        final DeviseField totalHT = (DeviseField) getEditor("T_HT");
123
        final DeviseField totalService = (DeviseField) getEditor("T_SERVICE");
124
        final DeviseField totalSupply = (DeviseField) getEditor("T_HA");
125
        final DeviseField totalDevise = (DeviseField) getEditor("T_DEVISE");
126
        final JTextField totalWeight = (JTextField) getEditor("T_POIDS");
127
        final DeviseField totalTTC = (DeviseField) getEditor("T_TTC");
128
        final DeviseField totalTVA = (DeviseField) getEditor("T_TVA");
142 ilm 129
        final DeviseField totalEco = (DeviseField) getEditor("T_ECO_CONTRIBUTION");
80 ilm 130
        final DeviseField totalRemise = (DeviseField) getEditor("REMISE_HT");
182 ilm 131
        final SQLRequestComboBox taxePort = (SQLRequestComboBox) getEditor("ID_TAXE_PORT");
142 ilm 132
        totalRemise.setEditable(false);
133
        totalRemise.setEnabled(false);
80 ilm 134
        final DeviseField totalPORT = (DeviseField) getEditor("PORT_HT");
135
        this.addView(totalPORT, "PORT_HT");
182 ilm 136
        this.addView(taxePort, "ID_TAXE_PORT");
80 ilm 137
        this.addView(totalTVA, "T_TVA");
138
        this.addView(totalTTC, "T_TTC");
142 ilm 139
        this.addView(totalEco, "T_ECO_CONTRIBUTION");
80 ilm 140
        this.addView(totalWeight, "T_POIDS");
141
        this.addView(totalDevise, "T_DEVISE");
142
        this.addView(totalSupply, "T_HA");
143
        this.addView(totalService, "T_SERVICE");
144
        this.addView(totalHT, "T_HT");
145
 
132 ilm 146
        final DeviseField fieldNet = new DeviseField();
147
        this.addView(fieldNet, "NET_A_PAYER");
148
        totalTTC.getDocument().addDocumentListener(new SimpleDocumentListener() {
149
 
150
            @Override
151
            public void update(DocumentEvent e) {
152
                fieldNet.setText(totalTTC.getText());
153
            }
154
        });
155
 
144 ilm 156
        final SQLRequestComboBox sqlRequestComboBoxAdr = (SQLRequestComboBox) getEditor("ID_ADRESSE");
157
        final SQLRequestComboBox sqlRequestComboBoxAdrL = (SQLRequestComboBox) getEditor("ID_ADRESSE_LIVRAISON");
158
 
80 ilm 159
        final SQLRequestComboBox sqlRequestComboBox = (SQLRequestComboBox) getEditor("sales.invoice.customer");
156 ilm 160
        final FactureSituationItemTable table = ((FactureSituationItemTable) getEditor("sales.invoice.partial.items.list"));
161
        final TotalPanel total = ((TotalPanel) getEditor("sales.invoice.partial.total.amount"));
162
 
80 ilm 163
        sqlRequestComboBox.addModelListener("wantedID", new PropertyChangeListener() {
164
 
165
            @Override
166
            public void propertyChange(PropertyChangeEvent evt) {
167
 
144 ilm 168
                int wantedID = sqlRequestComboBox.getWantedID();
169
 
170
                if (wantedID != SQLRow.NONEXISTANT_ID && wantedID >= SQLRow.MIN_VALID_ID) {
171
 
172
                    sqlRequestComboBoxAdr.getRequest().setWhere(new Where(getTable().getTable("ADRESSE").getField("ID_CLIENT"), "=", wantedID)
173
                            .and(new Where(getTable().getTable("ADRESSE").getField("TYPE"), "=", AdresseType.Invoice.getId())));
174
                    sqlRequestComboBoxAdrL.getRequest().setWhere(new Where(getTable().getTable("ADRESSE").getField("ID_CLIENT"), "=", wantedID)
175
                            .and(new Where(getTable().getTable("ADRESSE").getField("TYPE"), "=", AdresseType.Delivery.getId())));
156 ilm 176
                    SQLRow rowCli = getTable().getForeignTable("ID_CLIENT").getRow(wantedID);
177
                    if (rowCli.getObject("ID_CATEGORIE_COMPTABLE") != null && !rowCli.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
178
                        total.setCategorieComptable(rowCli.getForeign("ID_CATEGORIE_COMPTABLE"));
179
                        table.setRowCatComptable(rowCli.getForeign("ID_CATEGORIE_COMPTABLE"));
180
                    } else {
181
                        total.setCategorieComptable(null);
182
                        table.setRowCatComptable(null);
183
                    }
144 ilm 184
                } else {
185
                    sqlRequestComboBoxAdr.getRequest().setWhere(Where.FALSE);
186
                    sqlRequestComboBoxAdrL.getRequest().setWhere(Where.FALSE);
156 ilm 187
                    total.setCategorieComptable(null);
188
                    table.setRowCatComptable(null);
144 ilm 189
                }
190
 
80 ilm 191
                SQLElement sqleltModeRegl = Configuration.getInstance().getDirectory().getElement("MODE_REGLEMENT");
192
                final SQLRow client = sqlRequestComboBox.getSelectedRow();
193
                if (client != null && !client.isUndefined()) {
194
                    int idModeRegl = client.getInt("ID_MODE_REGLEMENT");
195
                    if (idModeRegl > 1) {
196
                        SQLRow rowModeRegl = sqleltModeRegl.getTable().getRow(idModeRegl);
197
                        SQLRowValues rowValsModeRegl = rowModeRegl.createUpdateRow();
198
                        rowValsModeRegl.clearPrimaryKeys();
199
                        ((ElementSQLObject) getEditor("ID_MODE_REGLEMENT")).setValue(rowValsModeRegl);
200
                    }
201
                }
202
 
203
            }
204
        });
205
        sqlRequestComboBox.setEnabled(false);
206
 
207
        final AcompteField acompteField = ((AcompteField) getEditor("sales.invoice.partial.amount"));
177 ilm 208
        listenerAcompteField = new SimpleDocumentListener() {
80 ilm 209
 
210
            @Override
211
            public void update(DocumentEvent e) {
180 ilm 212
                if (!isFilling()) {
213
                    Acompte a = acompteField.getValue();
214
                    table.calculPourcentage(a, TypeCalcul.CALCUL_FACTURABLE);
215
                }
80 ilm 216
            }
177 ilm 217
 
218
        };
219
        acompteField.getDocument().addDocumentListener(listenerAcompteField);
220
 
221
        listenerTable = new TableModelListener() {
222
 
223
            @Override
224
            public void tableChanged(TableModelEvent e) {
225
                acompteField.getDocument().removeDocumentListener(listenerAcompteField);
226
                if (e.getColumn() == table.getModel().getColumnForField("POURCENT_FACTURABLE")) {
227
                    Acompte a = new Acompte(null, table.getTotalHT(TypeCalcul.CALCUL_MONTANT_TOTAL));
228
                    acompteField.setValue(a);
229
 
230
                }
231
                acompteField.getDocument().addDocumentListener(listenerAcompteField);
232
            }
233
 
234
        };
235
        table.getRowValuesTable().getModel().addTableModelListener(listenerTable);
80 ilm 236
        total.addValueListener(new PropertyChangeListener() {
237
 
238
            @Override
239
            public void propertyChange(PropertyChangeEvent evt) {
240
                acompteField.setTotal(new BigDecimal(total.getTotalHT()).movePointLeft(2));
241
 
242
            }
243
        });
244
 
245
    }
246
 
177 ilm 247
    private SimpleDocumentListener listenerAcompteField;
248
    private TableModelListener listenerTable;
83 ilm 249
 
80 ilm 250
    @Override
251
    public JComponent getLabel(String id) {
252
        if (id.equals("sales.invoice.partial.amount")) {
132 ilm 253
            final JLabel jLabel = new JLabel("Montant HT (ou %) à facturer");
80 ilm 254
            jLabel.setHorizontalAlignment(SwingConstants.RIGHT);
255
            return jLabel;
142 ilm 256
        } else if (id.equals("panel.oo")) {
257
            return new JLabel();
80 ilm 258
        } else if (id.equals("sales.invoice.partial.total.amount")) {
259
            return new JLabel();
260
        } else {
261
            return super.getLabel(id);
262
        }
263
    }
264
 
265
    JUniqueTextField numberField;
266
 
267
    @Override
268
    public JComponent createEditor(String id) {
269
 
270
        if (id.equals("sales.invoice.number")) {
142 ilm 271
            this.numberField = new JUniqueTextField(20) {
272
                @Override
273
                public String getAutoRefreshNumber() {
274
                    if (getMode() == Mode.INSERTION) {
275
                        return NumerotationAutoSQLElement.getNextNumero(getElement().getClass(), ((JDate) getEditor("DATE")).getDate());
276
                    } else {
277
                        return null;
278
                    }
279
                }
280
            };
80 ilm 281
            return this.numberField;
142 ilm 282
        } else if (id.equals("panel.oo")) {
283
            this.panelOO = new PanelOOSQLComponent(this);
284
            return this.panelOO;
80 ilm 285
        } else if (id.equals("INFOS")) {
286
            final ITextArea jTextArea = new ITextArea();
287
            jTextArea.setFont(new JLabel().getFont());
288
            return jTextArea;
289
        } else if (id.equals("sales.invoice.partial.items.list")) {
290
            return new FactureSituationItemTable();
291
        } else if (id.equals("DATE")) {
292
            return new JDate(true);
293
        } else if (id.equals("T_POIDS")) {
294
            return new JTextField();
295
        } else if (id.equals("sales.invoice.partial.total.amount")) {
296
            final AbstractArticleItemTable items = (AbstractArticleItemTable) getEditor("sales.invoice.partial.items.list");
297
            // Set only VAT Editable
298
            for (int i = 0; i < items.getRowValuesTable().getColumnModel().getColumnCount(false); i++) {
299
                final SQLTableElement sqlTableElementAt = items.getRowValuesTable().getRowValuesTableModel().getSQLTableElementAt(i);
177 ilm 300
                if (sqlTableElementAt.getField() != null && (sqlTableElementAt.getField().getName().equalsIgnoreCase("ID_STYLE")
301
                        || sqlTableElementAt.getField().getName().equalsIgnoreCase("POURCENT_FACTURABLE") || sqlTableElementAt.getField().getName().equalsIgnoreCase("ID_TAXE"))) {
302
                    sqlTableElementAt.setEditable(true);
303
                } else {
80 ilm 304
                    sqlTableElementAt.setEditable(false);
305
                }
306
            }
307
 
308
            final DeviseField totalHT = (DeviseField) getEditor("T_HT");
142 ilm 309
            final DeviseField totalEco = (DeviseField) getEditor("T_ECO_CONTRIBUTION");
80 ilm 310
            final DeviseField totalService = (DeviseField) getEditor("T_SERVICE");
311
            final DeviseField totalSupply = (DeviseField) getEditor("T_HA");
312
            final DeviseField totalDevise = (DeviseField) getEditor("T_DEVISE");
313
            final JTextField totalWeight = (JTextField) getEditor("T_POIDS");
314
            final DeviseField totalTTC = (DeviseField) getEditor("T_TTC");
315
            final DeviseField totalTVA = (DeviseField) getEditor("T_TVA");
316
            final DeviseField totalRemise = (DeviseField) getEditor("REMISE_HT");
142 ilm 317
            totalRemise.setEditable(false);
318
            totalRemise.setEnabled(false);
319
            final AcompteField acompte = (AcompteField) getEditor("sales.invoice.partial.amount");
80 ilm 320
            final DeviseField totalPORT = (DeviseField) getEditor("PORT_HT");
142 ilm 321
            final SQLRequestComboBox taxePort = (SQLRequestComboBox) getEditor("ID_TAXE_PORT");
322
            return new TotalPanel(items, totalEco, totalHT, totalTVA, totalTTC, totalPORT, totalRemise, totalService, totalSupply, totalDevise, totalWeight, null, taxePort, acompte);
80 ilm 323
        } else if (id.startsWith("T_")) {
324
            return new DeviseField();
325
        } else if (id.equals("REMISE_HT") || id.equals("PORT_HT")) {
142 ilm 326
            DeviseField fieldD = new DeviseField();
327
            fieldD.setEditable(false);
328
            fieldD.setEnabled(false);
329
            return fieldD;
144 ilm 330
        } else if (id.startsWith("ID_ADRESSE")) {
331
            ElementComboBox comboAdrF = new ElementComboBox();
332
            comboAdrF.setButtonsVisible(false);
333
            final SQLElement adrElement = getElement().getForeignElement("ID_ADRESSE");
334
            comboAdrF.init(adrElement, adrElement.getComboRequest(true));
335
            comboAdrF.getRequest().setWhere(Where.FALSE);
336
            return comboAdrF;
80 ilm 337
        } else if (id.equals("sales.invoice.partial.amount")) {
338
            return new AcompteField();
339
        }
340
        return super.createEditor(id);
341
    }
342
 
343
    private final SQLTable tableNum = getElement().getTable().getTable("NUMEROTATION_AUTO");
344
 
345
    @Override
346
    public int insert(SQLRow order) {
347
 
348
        int idSaisieVF = SQLRow.NONEXISTANT_ID;
349
 
142 ilm 350
        int attempt = 0;
351
        // on verifie qu'un devis du meme numero n'a pas été inséré entre temps
352
        if (!this.numberField.checkValidation(false)) {
353
            while (attempt < JUniqueTextField.RETRY_COUNT) {
354
                String num = NumerotationAutoSQLElement.getNextNumero(getElement().getClass(), ((JDate) getEditor("DATE")).getDate());
355
                this.numberField.setText(num);
356
                attempt++;
357
                if (this.numberField.checkValidation(false)) {
358
                    System.err.println("ATEMPT " + attempt + " SUCCESS WITH NUMERO " + num);
359
                    break;
360
                }
361
                try {
362
                    Thread.sleep(JUniqueTextField.SLEEP_WAIT_MS);
363
                } catch (InterruptedException e) {
364
                    e.printStackTrace();
365
                }
366
            }
367
        }
368
        final String num = this.numberField.getText();
369
        if (attempt == JUniqueTextField.RETRY_COUNT) {
370
            idSaisieVF = getSelectedID();
371
            ExceptionHandler.handle("Impossible d'ajouter, numéro de facture existant.");
372
            final Object root = SwingUtilities.getRoot(this);
373
            if (root instanceof EditFrame) {
374
                final EditFrame frame = (EditFrame) root;
375
                frame.getPanel().setAlwaysVisible(true);
376
            }
377
        } else {
80 ilm 378
            idSaisieVF = super.insert(order);
379
            SQLRow rowFacture = getTable().getRow(idSaisieVF);
380
            // incrémentation du numéro auto
381
            if (NumerotationAutoSQLElement.getNextNumero(SaisieVenteFactureSQLElement.class, rowFacture.getDate("DATE").getTime()).equalsIgnoreCase(this.numberField.getText().trim())) {
382
                SQLRowValues rowVals = new SQLRowValues(this.tableNum);
383
 
384
                String labelNumberFor = NumerotationAutoSQLElement.getLabelNumberFor(SaisieVenteFactureSQLElement.class);
385
                int val = this.tableNum.getRow(2).getInt(labelNumberFor);
386
                val++;
387
                rowVals.put(labelNumberFor, Integer.valueOf(val));
388
                try {
389
                    rowVals.update(2);
390
                } catch (SQLException e1) {
391
                    e1.printStackTrace();
392
                }
132 ilm 393
            }
394
            ((AbstractArticleItemTable) getEditor("sales.invoice.partial.items.list")).updateField("ID_SAISIE_VENTE_FACTURE", idSaisieVF);
80 ilm 395
 
132 ilm 396
            new GenerationMvtSaisieVenteFacture(idSaisieVF);
80 ilm 397
 
132 ilm 398
            try {
399
                VenteFactureXmlSheet sheet = new VenteFactureXmlSheet(rowFacture);
400
                sheet.createDocument();
182 ilm 401
                sheet.showPrintAndExportAsynchronous(this.panelOO.isVisualisationSelected(), this.panelOO.isImpressionSelected(), true, getElement(), rowFacture);
132 ilm 402
            } catch (Exception e) {
403
                ExceptionHandler.handle("Une erreur est survenue lors de la création du document.", e);
404
            }
142 ilm 405
            if (attempt > 0) {
406
                SwingUtilities.invokeLater(new Runnable() {
407
                    public void run() {
408
                        JOptionPane.showMessageDialog(null, "Le numéro a été actualisé en " + num);
409
                    }
410
                });
80 ilm 411
            }
412
        }
413
        return idSaisieVF;
414
    }
415
 
416
    @Override
417
    public void update() {
418
 
142 ilm 419
        int id = getSelectedID();
80 ilm 420
        super.update();
142 ilm 421
        final SQLRow rowFacture = getTable().getRow(id);
80 ilm 422
        ((AbstractArticleItemTable) getEditor("sales.invoice.partial.items.list")).updateField("ID_SAISIE_VENTE_FACTURE", id);
423
 
142 ilm 424
        int idMvt = rowFacture.getInt("ID_MOUVEMENT");
425
        // on supprime tout ce qui est lié à la facture
426
        System.err.println("Archivage des fils");
427
        EcritureSQLElement eltEcr = (EcritureSQLElement) getDirectory().getElement("ECRITURE");
428
        eltEcr.archiveMouvementProfondeur(idMvt, false);
429
        new GenerationMvtSaisieVenteFacture(id);
430
        try {
431
            VenteFactureXmlSheet sheet = new VenteFactureXmlSheet(rowFacture);
432
            sheet.createDocument();
182 ilm 433
            sheet.showPrintAndExportAsynchronous(this.panelOO.isVisualisationSelected(), this.panelOO.isImpressionSelected(), true, getElement(), rowFacture);
142 ilm 434
        } catch (Exception e) {
435
            ExceptionHandler.handle("Une erreur est survenue lors de la création du document.", e);
436
        }
80 ilm 437
    }
438
 
439
    @Override
440
    protected SQLRowValues createDefaults() {
441
        SQLRowValues rowVals = new SQLRowValues(getTable());
442
        rowVals.put("NUMERO", NumerotationAutoSQLElement.getNextNumero(SaisieVenteFactureSQLElement.class, new Date()));
443
        rowVals.put("PARTIAL", Boolean.TRUE);
444
        return rowVals;
445
    }
446
 
447
    @Override
448
    public Component addView(JComponent comp, String id) {
449
        if (id.equals("sales.invoice.partial.amount")) {
450
            return super.addView(new AcompteRowItemView((AcompteField) comp), "MONTANT_FACTURABLE,POURCENT_FACTURABLE", REQ);
451
        } else {
452
            return super.addView(comp, id);
453
        }
454
    }
455
}