OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 151 Rev 156
Line 157... Line 157...
157
            return t;
157
            return t;
158
        } else if (id.equals("GROUPE") || id.equals("FORME_JURIDIQUE") || id.equals("CENTRE_GESTION") || id.equals("METHODE_RELANCE")) {
158
        } else if (id.equals("GROUPE") || id.equals("FORME_JURIDIQUE") || id.equals("CENTRE_GESTION") || id.equals("METHODE_RELANCE")) {
159
            return new SQLSearchableTextCombo(ComboLockedMode.UNLOCKED, 1, 20, false);
159
            return new SQLSearchableTextCombo(ComboLockedMode.UNLOCKED, 1, 20, false);
160
        } else if (id.equals("SITE_INTERNET")) {
160
        } else if (id.equals("SITE_INTERNET")) {
161
            return new TextFieldWithWebBrowsing();
161
            return new TextFieldWithWebBrowsing();
-
 
162
        } else if (id.equals("SIRET")) {
-
 
163
            return new JTextField(20);
162
        } else if (id.equals("DATE")) {
164
        } else if (id.equals("DATE")) {
163
            return new JDate(true);
165
            return new JDate(true);
164
        } else if (id.equals("customerrelationship.customer.contacts")) {
166
        } else if (id.equals("customerrelationship.customer.contacts")) {
165
            return this.table;
167
            return this.table;
166
        } else if (id.equals("customerrelationship.customer.customproduct")) {
168
        } else if (id.equals("customerrelationship.customer.customproduct")) {
Line 261... Line 263...
261
    public int insert(SQLRow order) {
263
    public int insert(SQLRow order) {
262
        int id;
264
        int id;
263
 
265
 
264
        int attempt = 0;
266
        int attempt = 0;
265
        // on verifie qu'un client du meme numero n'a pas été inséré entre temps
267
        // on verifie qu'un client du meme numero n'a pas été inséré entre temps
266
        if (!this.code.checkValidation(false)) {
268
        if (this.code.getText().trim().length() > 0 && !this.code.checkValidation(false)) {
267
            while (attempt < JUniqueTextField.RETRY_COUNT) {
269
            while (attempt < JUniqueTextField.RETRY_COUNT) {
268
                String num = NumerotationAutoSQLElement.getNextNumero(getElement().getClass());
270
                String num = NumerotationAutoSQLElement.getNextNumero(getElement().getClass());
269
                this.code.setText(num);
271
                this.code.setText(num);
270
                attempt++;
272
                attempt++;
271
                if (this.code.checkValidation(false)) {
273
                if (this.code.checkValidation(false)) {