OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 182
Line 1... Line 1...
1
/*
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 * 
3
 * 
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
4
 * Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
5
 * 
5
 * 
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
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
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
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.
9
 * language governing permissions and limitations under the License.
Line 58... Line 58...
58
        this.op = eltField.getAttributeValue("op");
58
        this.op = eltField.getAttributeValue("op");
59
 
59
 
60
        this.row = row;
60
        this.row = row;
61
        if ((this.row == null || !this.row.getTable().getSchema().getName().equalsIgnoreCase("Common")) && base != null && base.equalsIgnoreCase("COMMON")) {
61
        if ((this.row == null || !this.row.getTable().getSchema().getName().equalsIgnoreCase("Common")) && base != null && base.equalsIgnoreCase("COMMON")) {
62
            this.row = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
62
            this.row = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete();
-
 
63
            if (!this.row.getString("DATABASE_NAME").equalsIgnoreCase(row.getTable().getDBRoot().getName())) {
-
 
64
                this.row = this.row.getTable().getRow(Integer.valueOf(row.getTable().getDBRoot().getName().replaceAll("OpenConcerto", "")));
-
 
65
            }
63
        }
66
        }
64
        if (this.row == null) {
67
        if (this.row == null) {
65
            this.row = sqlElt.getTable().getRow(id);
68
            this.row = sqlElt.getTable().getRow(id);
66
        }
69
        }
67
 
70
 
Line 528... Line 531...
528
        }
531
        }
529
    }
532
    }
530
 
533
 
531
    private Object getTraduction() {
534
    private Object getTraduction() {
532
        if (this.rowLanguage == null || this.rowLanguage.isUndefined()) {
535
        if (this.rowLanguage == null || this.rowLanguage.isUndefined()) {
533
            return null;
536
            return this.row.getObject(this.elt.getAttributeValue("name"));
534
        }
537
        }
535
        int id = ReferenceArticleSQLElement.getIdForCNM(row.asRowValues(), false);
538
        int id = ReferenceArticleSQLElement.getIdForCNM(row.asRowValues(), false);
536
        SQLTable table = Configuration.getInstance().getBase().getTable("ARTICLE_DESIGNATION");
539
        SQLTable table = Configuration.getInstance().getBase().getTable("ARTICLE_DESIGNATION");
537
        SQLSelect sel = new SQLSelect(table.getBase());
540
        SQLSelect sel = new SQLSelect(table.getBase());
538
        sel.addSelectStar(table);
541
        sel.addSelectStar(table);