OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 149 Rev 156
Line 197... Line 197...
197
        this.add(this.fournisseur, c);
197
        this.add(this.fournisseur, c);
198
 
198
 
199
        this.tableBonItem = new BonReceptionItemTable();
199
        this.tableBonItem = new BonReceptionItemTable();
200
        this.addRequiredSQLObject(this.fournisseur, "ID_FOURNISSEUR");
200
        this.addRequiredSQLObject(this.fournisseur, "ID_FOURNISSEUR");
201
 
201
 
-
 
202
        fournisseur.addModelListener("wantedID", new PropertyChangeListener() {
-
 
203
 
-
 
204
            @Override
-
 
205
            public void propertyChange(PropertyChangeEvent evt) {
-
 
206
                int wantedID = fournisseur.getWantedID();
-
 
207
                if (wantedID != SQLRow.NONEXISTANT_ID && wantedID >= SQLRow.MIN_VALID_ID) {
-
 
208
 
-
 
209
                    final SQLRow rowF = getTable().getForeignTable("ID_FOURNISSEUR").getRow(wantedID);
-
 
210
 
-
 
211
                    if (rowF.getObject("ID_CATEGORIE_COMPTABLE") != null && !rowF.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
-
 
212
                        tableBonItem.setRowCatComptable(rowF.getForeign("ID_CATEGORIE_COMPTABLE"));
-
 
213
                    } else {
-
 
214
                        tableBonItem.setRowCatComptable(null);
-
 
215
                    }
-
 
216
 
-
 
217
                } else {
-
 
218
                    tableBonItem.setRowCatComptable(null);
-
 
219
                }
-
 
220
            }
-
 
221
        });
-
 
222
 
202
        // Devise
223
        // Devise
203
        c.gridx = 0;
224
        c.gridx = 0;
204
        c.gridy++;
225
        c.gridy++;
205
        c.weightx = 0;
226
        c.weightx = 0;
206
        c.fill = GridBagConstraints.HORIZONTAL;
227
        c.fill = GridBagConstraints.HORIZONTAL;
Line 436... Line 457...
436
        this.allowEditable("T_ECO_CONTRIBUTION", false);
457
        this.allowEditable("T_ECO_CONTRIBUTION", false);
437
        this.allowEditable("TOTAL_HT", false);
458
        this.allowEditable("TOTAL_HT", false);
438
        this.allowEditable("TOTAL_TVA", false);
459
        this.allowEditable("TOTAL_TVA", false);
439
        this.allowEditable("TOTAL_TTC", false);
460
        this.allowEditable("TOTAL_TTC", false);
440
 
461
 
441
        final TotalPanel totalTTC = new TotalPanel(this.tableBonItem, fieldEco, fieldHT, fieldTVA, fieldTTC, textPortHT, textRemiseHT, fieldService, null, fieldDevise, null, null,
462
        final TotalPanel totalTTC = new TotalPanel(this.tableBonItem, fieldEco, fieldHT, fieldTVA, fieldTTC, textPortHT, textRemiseHT, fieldService, null, fieldDevise, textPoidsTotal, null,
442
                (getTable().contains("ID_TAXE_PORT") ? comboTaxePort : null), null);
463
                (getTable().contains("ID_TAXE_PORT") ? comboTaxePort : null), null);
443
 
464
 
444
        c.gridx++;
465
        c.gridx++;
445
        c.gridy--;
466
        c.gridy--;
446
        c.gridwidth = GridBagConstraints.REMAINDER;
467
        c.gridwidth = GridBagConstraints.REMAINDER;