OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 142 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 162... Line 162...
162
        return super.createEditor(id);
162
        return super.createEditor(id);
163
    }
163
    }
164
 
164
 
165
    private enum Type_Diff {
165
    private enum Type_Diff {
166
        SITE("SITE"), DONNEUR_ORDRE("DONNEUR");
166
        SITE("SITE"), DONNEUR_ORDRE("DONNEUR");
-
 
167
 
167
        private final String name;
168
        private final String name;
168
 
169
 
169
        private Type_Diff(String name) {
170
        private Type_Diff(String name) {
170
            this.name = name;
171
            this.name = name;
171
        }
172
        }
Line 514... Line 515...
514
            // Création des articles
515
            // Création des articles
515
            this.table.createArticle(idDevis, getElement());
516
            this.table.createArticle(idDevis, getElement());
516
 
517
 
517
            // generation du document
518
            // generation du document
518
            try {
519
            try {
-
 
520
                final SQLRow row = getTable().getRow(idDevis);
519
                final DevisXmlSheet sheet = new DevisXmlSheet(getTable().getRow(idDevis));
521
                final DevisXmlSheet sheet = new DevisXmlSheet(row);
520
                sheet.createDocumentAsynchronous();
522
                sheet.createDocumentAsynchronous();
521
                sheet.showPrintAndExportAsynchronous(QuoteSQLComponent.this.panelOO.isVisualisationSelected(), QuoteSQLComponent.this.panelOO.isImpressionSelected(), true);
523
                sheet.showPrintAndExportAsynchronous(QuoteSQLComponent.this.panelOO.isVisualisationSelected(), QuoteSQLComponent.this.panelOO.isImpressionSelected(), true, getElement(), row);
522
            } catch (Exception e) {
524
            } catch (Exception e) {
523
                ExceptionHandler.handle("Impossible de créer le devis", e);
525
                ExceptionHandler.handle("Impossible de créer le devis", e);
524
            }
526
            }
525
 
527
 
526
            // incrémentation du numéro auto
528
            // incrémentation du numéro auto
Line 595... Line 597...
595
        this.table.createArticle(getSelectedID(), getElement());
597
        this.table.createArticle(getSelectedID(), getElement());
596
 
598
 
597
        // generation du document
599
        // generation du document
598
 
600
 
599
        try {
601
        try {
-
 
602
            final SQLRow row = getTable().getRow(getSelectedID());
600
            final DevisXmlSheet sheet = new DevisXmlSheet(getTable().getRow(getSelectedID()));
603
            final DevisXmlSheet sheet = new DevisXmlSheet(row);
601
            sheet.createDocumentAsynchronous();
604
            sheet.createDocumentAsynchronous();
602
            sheet.showPrintAndExportAsynchronous(QuoteSQLComponent.this.panelOO.isVisualisationSelected(), QuoteSQLComponent.this.panelOO.isImpressionSelected(), true);
605
            sheet.showPrintAndExportAsynchronous(QuoteSQLComponent.this.panelOO.isVisualisationSelected(), QuoteSQLComponent.this.panelOO.isImpressionSelected(), true, getElement(), row);
603
        } catch (Exception e) {
606
        } catch (Exception e) {
604
            ExceptionHandler.handle("Impossible de créer le devis", e);
607
            ExceptionHandler.handle("Impossible de créer le devis", e);
605
        }
608
        }
606
 
609
 
607
    }
610
    }
Line 636... Line 639...
636
 
639
 
637
            for (final SQLRow rowElt : myListItem) {
640
            for (final SQLRow rowElt : myListItem) {
638
 
641
 
639
                final SQLRowValues rowVals = rowElt.createUpdateRow();
642
                final SQLRowValues rowVals = rowElt.createUpdateRow();
640
                rowVals.clearPrimaryKeys();
643
                rowVals.clearPrimaryKeys();
641
                this.table.getModel().addRow(rowVals);
644
                this.table.getModel().addRow(rowVals, false);
642
                final int rowIndex = this.table.getModel().getRowCount() - 1;
645
                final int rowIndex = this.table.getModel().getRowCount() - 1;
643
                this.table.getModel().fireTableModelModified(rowIndex);
646
                this.table.getModel().fireTableModelModified(rowIndex);
644
            }
647
            }
645
        } else {
648
        } else {
646
            this.table.getModel().clearRows();
649
            this.table.getModel().clearRows();