OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 156 Rev 174
Line 25... Line 25...
25
import org.openconcerto.erp.core.common.ui.AcompteRowItemView;
25
import org.openconcerto.erp.core.common.ui.AcompteRowItemView;
26
import org.openconcerto.erp.core.common.ui.DeviseField;
26
import org.openconcerto.erp.core.common.ui.DeviseField;
27
import org.openconcerto.erp.core.common.ui.TotalPanel;
27
import org.openconcerto.erp.core.common.ui.TotalPanel;
28
import org.openconcerto.erp.core.customerrelationship.customer.ui.AddressChoiceUI;
28
import org.openconcerto.erp.core.customerrelationship.customer.ui.AddressChoiceUI;
29
import org.openconcerto.erp.core.customerrelationship.customer.ui.AdresseType;
29
import org.openconcerto.erp.core.customerrelationship.customer.ui.AdresseType;
-
 
30
import org.openconcerto.erp.core.customerrelationship.customer.ui.CategorieComptableChoiceUI;
30
import org.openconcerto.erp.core.finance.tax.model.TaxeCache;
31
import org.openconcerto.erp.core.finance.tax.model.TaxeCache;
31
import org.openconcerto.erp.core.sales.quote.element.EtatDevisSQLElement;
32
import org.openconcerto.erp.core.sales.quote.element.EtatDevisSQLElement;
32
import org.openconcerto.erp.core.sales.quote.report.DevisXmlSheet;
33
import org.openconcerto.erp.core.sales.quote.report.DevisXmlSheet;
33
import org.openconcerto.erp.core.sales.quote.ui.DevisItemTable;
34
import org.openconcerto.erp.core.sales.quote.ui.DevisItemTable;
34
import org.openconcerto.erp.panel.PanelOOSQLComponent;
35
import org.openconcerto.erp.panel.PanelOOSQLComponent;
Line 381... Line 382...
381
                            addressUI.getComboAdrL().getRequest().setWhere(Where.FALSE);
382
                            addressUI.getComboAdrL().getRequest().setWhere(Where.FALSE);
382
                        }
383
                        }
383
                    }
384
                    }
384
                });
385
                });
385
            }
386
            }
-
 
387
            if (prefs.getBoolean(GestionCommercialeGlobalPreferencePanel.CATEGORIE_COMPTABLE_SPEC, false)) {
-
 
388
                // cat spe
-
 
389
                final CategorieComptableChoiceUI catUI = new CategorieComptableChoiceUI();
-
 
390
                catUI.addToUI(this, c);
-
 
391
                catUI.getCombo().addModelListener("wantedID", new PropertyChangeListener() {
-
 
392
 
-
 
393
                    @Override
-
 
394
                    public void propertyChange(PropertyChangeEvent evt) {
-
 
395
                        int wantedID = catUI.getCombo().getWantedID();
-
 
396
                        if (wantedID != SQLRow.NONEXISTANT_ID && wantedID >= SQLRow.MIN_VALID_ID) {
-
 
397
                            table.setRowCatComptable(catUI.getCombo().getElement().getTable().getRow(wantedID));
-
 
398
                        } else {
-
 
399
                            table.setRowCatComptable(null);
-
 
400
                        }
-
 
401
                    }
-
 
402
                });
-
 
403
            }
386
            if (getTable().contains("ID_CONTACT")) {
404
            if (getTable().contains("ID_CONTACT")) {
387
                // Contact Client
405
                // Contact Client
388
                c.gridx = 0;
406
                c.gridx = 0;
389
                c.gridy++;
407
                c.gridy++;
390
                c.gridwidth = 1;
408
                c.gridwidth = 1;
Line 416... Line 434...
416
                        if (wantedID != SQLRow.NONEXISTANT_ID && wantedID >= SQLRow.MIN_VALID_ID) {
434
                        if (wantedID != SQLRow.NONEXISTANT_ID && wantedID >= SQLRow.MIN_VALID_ID) {
417
 
435
 
418
                            final SQLRow rowClient = getTable().getForeignTable("ID_CLIENT").getRow(wantedID);
436
                            final SQLRow rowClient = getTable().getForeignTable("ID_CLIENT").getRow(wantedID);
419
                            int idClient = rowClient.getID();
437
                            int idClient = rowClient.getID();
420
                            comboContact.getRequest().setWhere(new Where(contactElement.getTable().getField("ID_CLIENT"), "=", idClient));
438
                            comboContact.getRequest().setWhere(new Where(contactElement.getTable().getField("ID_CLIENT"), "=", idClient));
-
 
439
                            if (!isFilling()) {
-
 
440
                                table.setClient(rowClient, true);
-
 
441
                            }
-
 
442
 
421
                        } else {
443
                        } else {
422
                            comboContact.getRequest().setWhere(Where.FALSE);
444
                            comboContact.getRequest().setWhere(Where.FALSE);
-
 
445
                            if (!isFilling()) {
-
 
446
                                table.setClient(null, true);
-
 
447
                            }
423
                            DevisSQLComponent.this.table.setTarif(null, false);
448
                            DevisSQLComponent.this.table.setTarif(null, false);
424
                        }
449
                        }
425
                    }
450
                    }
426
                });
451
                });
427
 
452