OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 177
Line 3237... Line 3237...
3237
    private void patchFieldElt1Dot3(SQLTable table, DBRoot root) {
3237
    private void patchFieldElt1Dot3(SQLTable table, DBRoot root) {
3238
 
3238
 
3239
        List<String> cols = Arrays.asList("PV_HT", "PA_DEVISE_T", "T_PV_HT", "T_PA_TTC", "T_PA_HT", "PA_HT", "T_PV_TTC", "PRIX_METRIQUE_HA_2", "PRIX_METRIQUE_HA_1", "PRIX_METRIQUE_HA_3",
3239
        List<String> cols = Arrays.asList("PV_HT", "PA_DEVISE_T", "T_PV_HT", "T_PA_TTC", "T_PA_HT", "PA_HT", "T_PV_TTC", "PRIX_METRIQUE_HA_2", "PRIX_METRIQUE_HA_1", "PRIX_METRIQUE_HA_3",
3240
                "PRIX_METRIQUE_VT_2", "PRIX_METRIQUE_VT_1", "MONTANT_HT", "MONTANT_INITIAL", "PRIX_METRIQUE_VT_3", "MARGE_HT", "PA_DEVISE", "PV_U_DEVISE", "PV_T_DEVISE", "PV_TTC", "TARIF_Q18_HT",
3240
                "PRIX_METRIQUE_VT_2", "PRIX_METRIQUE_VT_1", "MONTANT_HT", "MONTANT_INITIAL", "PRIX_METRIQUE_VT_3", "MARGE_HT", "PA_DEVISE", "PV_U_DEVISE", "PV_T_DEVISE", "PV_TTC", "TARIF_Q18_HT",
3241
                "T_PRIX_FINAL_TTC", "PRIX_FINAL_TTC", "PV_UNIT_HT", "PREBILAN", "MARGE_PREBILAN_HT");
3241
                "T_PRIX_FINAL_TTC", "PRIX_FINAL_TTC", "PV_UNIT_HT", "PREBILAN", "MARGE_PREBILAN_HT");
-
 
3242
        if (table == null) {
-
 
3243
            return;
3242
 
3244
        }
3243
        if ((table.contains("PV_HT") && table.getField("PV_HT").getType().getDecimalDigits() == 0)
3245
        if ((table.contains("PV_HT") && table.getField("PV_HT").getType().getDecimalDigits() == 0)
3244
                || (table.contains("PV_UNIT_HT") && table.getField("PV_UNIT_HT").getType().getDecimalDigits() == 0)) {
3246
                || (table.contains("PV_UNIT_HT") && table.getField("PV_UNIT_HT").getType().getDecimalDigits() == 0)) {
3245
            AlterTable t = new AlterTable(table);
3247
            AlterTable t = new AlterTable(table);
3246
            UpdateBuilder builder = new UpdateBuilder(table);
3248
            UpdateBuilder builder = new UpdateBuilder(table);
3247
            List<UpdateBuilder> builds = new ArrayList<UpdateBuilder>();
3249
            List<UpdateBuilder> builds = new ArrayList<UpdateBuilder>();
Line 4009... Line 4011...
4009
 
4011
 
4010
        // FK
4012
        // FK
4011
        new AddFK(root.getDBSystemRoot()).changeAll(root);
4013
        new AddFK(root.getDBSystemRoot()).changeAll(root);
4012
 
4014
 
4013
        // Couleur
4015
        // Couleur
4014
        final SQLTable tableUser = root.getTable("USER_COMMON");
4016
        final SQLTable tableUser = root.findTable("USER_COMMON");
4015
        if (!tableUser.contains("COLOR")) {
4017
        if (!tableUser.contains("COLOR")) {
4016
            final AlterTable alter = new AlterTable(tableUser);
4018
            final AlterTable alter = new AlterTable(tableUser);
4017
            alter.addIntegerColumn("COLOR", 0, false);
4019
            alter.addIntegerColumn("COLOR", 0, false);
4018
            Updater_1_5.exec(alter);
4020
            Updater_1_5.exec(alter);
4019
        }
4021
        }