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 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 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 12... Line 12...
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.sql.model;
14
 package org.openconcerto.sql.model;
15
 
15
 
16
import org.openconcerto.sql.Configuration;
16
import org.openconcerto.sql.Configuration;
-
 
17
import org.openconcerto.sql.element.SQLElement;
17
import org.openconcerto.sql.model.graph.SQLKey;
18
import org.openconcerto.sql.model.graph.SQLKey;
18
import org.openconcerto.sql.model.graph.TablesMap;
19
import org.openconcerto.sql.model.graph.TablesMap;
19
import org.openconcerto.sql.preferences.SQLPreferences;
20
import org.openconcerto.sql.preferences.SQLPreferences;
20
import org.openconcerto.sql.utils.AlterTable;
21
import org.openconcerto.sql.utils.AlterTable;
21
import org.openconcerto.sql.utils.ChangeTable;
22
import org.openconcerto.sql.utils.ChangeTable;
Line 222... Line 223...
222
            }
223
            }
223
        } else if (prefs.getBoolean("TransfertMultiRef", false)) {
224
        } else if (prefs.getBoolean("TransfertMultiRef", false)) {
224
            SQLRowValues rowValsHeader = new SQLRowValues(UndefinedRowValuesCache.getInstance().getDefaultRowValues(tableElementDestination));
225
            SQLRowValues rowValsHeader = new SQLRowValues(UndefinedRowValuesCache.getInstance().getDefaultRowValues(tableElementDestination));
225
            // FIXME Style forcé en titre 1 via l'ID
226
            // FIXME Style forcé en titre 1 via l'ID
226
            rowValsHeader.put("ID_STYLE", 3);
227
            rowValsHeader.put("ID_STYLE", 3);
-
 
228
            SQLElement element = Configuration.getInstance().getDirectory().getElement(getSource());
-
 
229
            //Utiliser pour les transfert du module commande interne
-
 
230
            if (element == null) {
-
 
231
                element = Configuration.getInstance().getDirectory().getElement(getSource().getName());
-
 
232
            }
-
 
233
 
227
            String elementName = StringUtils.firstUp(Configuration.getInstance().getDirectory().getElement(getSource()).getName().getVariant(org.openconcerto.utils.i18n.Grammar.SINGULAR));
234
            String elementName = StringUtils.firstUp(element.getName().getVariant(org.openconcerto.utils.i18n.Grammar.SINGULAR));
228
            rowValsHeader.put("NOM", elementName + "\n N° " + srcRow.getString("NUMERO") + " du " + dateFormat.format(srcRow.getDate("DATE").getTime()));
235
            rowValsHeader.put("NOM", elementName + "\n N° " + srcRow.getString("NUMERO") + " du " + dateFormat.format(srcRow.getDate("DATE").getTime()));
229
            rowValsHeader.put(refField, rowVals);
236
            rowValsHeader.put(refField, rowVals);
230
        }
237
        }
231
    }
238
    }
232
 
239